Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy via proxy is not working #212

Closed
vedmaka opened this issue Jul 20, 2015 · 6 comments
Closed

Destroy via proxy is not working #212

vedmaka opened this issue Jul 20, 2015 · 6 comments

Comments

@vedmaka
Copy link

vedmaka commented Jul 20, 2015

I've noticed that destroying slider via proxy method is not working:

$("#myslider").sly(false);

Only direct destroy call works. You can try it yourself at Sly promo page:
Navigate to http://darsa.in/sly/ , open JS console and execute this code:

$('.frame').sly(false);

Nothing was destroyed.

@vedmaka
Copy link
Author

vedmaka commented Jul 20, 2015

Btw, none of methods working when called via proxy - you can test it at http://darsa.in/sly/ too. Eg:

$('.frame').sly('slideTo',100);

Do nothing.

@vedmaka
Copy link
Author

vedmaka commented Jul 20, 2015

Update: made few test and found that destroy via proxy working only if slider was initialized via proxy:

$('#frame').sly({ ...options.. })

@vedmaka
Copy link
Author

vedmaka commented Jul 20, 2015

Reason why this happening is that reference to Sly instance stored in data attribute only when Sly created via proxy. Pull request: #213

@darsain
Copy link
Owner

darsain commented Aug 8, 2015

Yeah, that was kinda by design, but I guess it makes sense while Sly still supports jQuery. I'm gonna implement your fix.

And sorry for the delay 😐.

@darsain
Copy link
Owner

darsain commented Aug 8, 2015

Should be fixed now.

@vedmaka
Copy link
Author

vedmaka commented Aug 8, 2015

Hooray, thanks! 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants