This repository has been archived by the owner on Jul 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
Callbacks only apply to first of original selector #4
Comments
Can you provide example on jsfiddle? |
This is the broken version http://jsfiddle.net/6TDF7/3/ I'm actually testing my fix, and for some reason it worked in IE, but doesn't want to work in Chrome. |
I've updated the original comment with the proper fix. Need to replace the line I mentioned with Working: http://jsfiddle.net/jQbYH/3/ |
nazar-pc
added a commit
that referenced
this issue
Jan 8, 2014
Please, try latest Git version 2.2.1, it should work correctly. |
It appears to be working perfectly now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you use
all the callbacks get applied to the first selector match. While I'm not sure the following change doesn't have any other affects, changing
options[i] = options[i].bind(this);
to$this.bind(options[i]);
on https://github.com/nazar-pc/PickMeUp/blob/master/js/jquery.pickmeup.js#L718 fixes it.This is because you aren't binding the callbacks to the selector, so
this
always refers to the first matched selector.The text was updated successfully, but these errors were encountered: