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

Plugin breaks in jQuery 1.8 #3

Closed
can3p opened this issue Aug 30, 2012 · 4 comments
Closed

Plugin breaks in jQuery 1.8 #3

can3p opened this issue Aug 30, 2012 · 4 comments

Comments

@can3p
Copy link

can3p commented Aug 30, 2012

In jQuery 1.8 node.data('events') doesn't return events bound to the element anymore, it does $._data(node, 'events') instead. Because of this change plugin throws exception during execution. This also affects jQuery.event.swipe

@stephband
Copy link
Owner

Yeah, I know :(

I have been fearing the day jQuery would remove .data('events'). They've talked about it off and on for ages. I don't quite understand why they consider it so bad. It's incredibly useful to know what events are bound.

Rather than using their new way of getting the data, which they're threatening to break again in future, a better fix would involve re-writing it a bit so that it kept track of it's own bindings-per-node. (Hey, I could always expose that sort of data in an object - say, something like, umm, .data('events')! Cool.)

@stephband
Copy link
Owner

Ok, fixed. I worked around the need to see bound events. Also added AMD support and bumped to 1.2. Please test and comment if you find anything.

Cheers!

@can3p
Copy link
Author

can3p commented Sep 6, 2012

Thank you for the fix! Both plugin functionality and AMD support work perfectly now. Can the similar changes be expected for jquery.event.swipe plugin?

@stephband
Copy link
Owner

You got it:

stephband/jquery.event.swipe@46bdbe0

Cheers!

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