-
Notifications
You must be signed in to change notification settings - Fork 136
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
Making jQuery event work with nod #97
Comments
Hi. :) You are exactly right, except it isn't really a bug in jQuery, but rather a conscious choice on their part. That sucks, but I can definitely understand them. Thanks for bringing it to my attention. The only real option I see, is to detect whether jQuery is present, and if so, use its event system to listen for jQuery changes. It's not pretty, but it should work. However, even this solution has its limitations (even though I already use it in var myNod = nod({jQuery: $}); to explicitly let nod.js know that it's okay to use jQuery, and where to find it. I'll give this one some thought and get back to you. Thanks for using nod.js. It warms my heart to hear when my little project here solves actual problems for people. :) Btw. I updated your example, to be a little easier to work with: http://jsfiddle.net/404xxouw/3/ |
Sorry I didn't issue a pull request myself, I'm definitely not good enough in javascript to modify properly your code :) But I think the solution of adding a configuration telling the library to use jquery is a good one ! |
Don't worry about that. It'll come. Your issue here was a good help for me. I'll do the rest ;) |
I think I might like the idea of adding it as an argument. I could extend that to adding underscore if you want me to use underscore's |
You're right, that would be cool too ^^ |
Hep! Solved :) Check here: I decided to just go with the var myNod = nod({
delay: 400,
jQuery: $
}); I also added https://github.com/casperin/nod#force-nod-to-perform-a-check (see issue #96) that you might find interesting (sort of does the same thing, but differently). |
Awesome! I'm actually using both functionalities now! Keep up the good work ;) |
👍 Good to hear. |
Hello,
I couldn't make the jQuery trigger('change') work when modifying an input field with jquery val('value').
This seems to be related to the problem described in this ticket: http://bugs.jquery.com/ticket/11047
Here's a simple example showing the problem : http://jsfiddle.net/404xxouw/2/
I get that it's more a jQuery issue than a nod one, but seeing how jQuery is widely used, would there be a way to make nod work seemlessly with jQuery ? (I'm not good enough in javascript to now if it's possible or not ^^).
Thanks a lot!
The text was updated successfully, but these errors were encountered: