-
Notifications
You must be signed in to change notification settings - Fork 48
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
interoperating with jQuery noConflict() #8
Comments
I am open to suggestions - even better, I accept pull requests! :) |
If somebody wants a temporary solution: Just search for "$(" in Zebra_Form.php and replace all with "jQuery(". This did resolve the errors in the console for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The jQuery function noConflict() removes the global references to jQuery so that you can safely use multiple versions of jQuery on a single page (multiple jQuery libraries is a necessary evil if you're working with a lot of third party embedded content).
The Zebra Form javascript code that is written out to the HTML page depends on the globals jQuery and $. If you're using noConflict(), those won't be available, and the client side validation won't work.
It would be great if we could specify an alternate name for jQuery. That way, we could safely put a reference to jQuery somewhere that Zebra Form can get to it.
Even better would be if all this code could run cleanly inside of a require.js module. We've wrapped up the static Javascript files in a require.js module, but that dynamically generated code is tricky. You would have to build a data structure with all the form's rules and make that available somehow to the require.js module. It's doable, but it's a pretty large change.
The text was updated successfully, but these errors were encountered: