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

jquery events vs. js/dom events #705

Open
erdalkaraca opened this issue Jan 23, 2017 · 5 comments
Open

jquery events vs. js/dom events #705

erdalkaraca opened this issue Jan 23, 2017 · 5 comments

Comments

@erdalkaraca
Copy link

I have a custom binder that uses jquery on(...) events binding.
The binder works as expected in Opera but fails in other browsers.
First, I thought this might be a browser caching problem. but then I debugged the rivets sources to observe that rivets checks whether jquery is available or not and hence decides for either jquery events or js/dom events.

To make it short: I had to make sure that jquery was loaded before rivetsjs (via RequireJS).
Is this a known issue? Is there a hint to be aware of this scenario?

@benadamstyles
Copy link
Collaborator

Which version of rivets are you using?

@erdalkaraca
Copy link
Author

I am at 0.9.3

@benadamstyles
Copy link
Collaborator

Could you try updating to 0.9.6 and see if it fixes your issue? 0.9.5 added a fix regarding jQuery usage.

@erdalkaraca
Copy link
Author

erdalkaraca commented Jan 23, 2017

With 9.6.3 I get this error in the console:
Uncaught TypeError: jQuery is not a function at Binding.routine (rivets.js:1026) at Binding.Rivets.Binding.Binding.set (rivets.js:653) at Binding.set (rivets.js:7) at Binding.Rivets.Binding.Binding.sync (rivets.js:658) at Binding.sync (rivets.js:7) at Binding.Rivets.Binding.Binding.bind (rivets.js:719) at Binding.bind (rivets.js:7) at View.Rivets.View.View.bind (rivets.js:478) at View.bind (rivets.js:7) at Object.bind (rivets.js:58)

Now, I have to make sure jquery is loaded before rivets in any case.

@Namek
Copy link
Contributor

Namek commented May 24, 2017

@erdalkaraca AFAIR I have encountered similiar problem, may the 0.9.6 fix that with a33ce65?

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

3 participants