-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Please use jQuery to refer to jQuery and not $ #685
Comments
You should deregister the jQuery Wordpress is using and register the 'normal' one. Don't forget to NOT deregister when in admin. This will solve your problem. |
@gideonheilbron A vast majority of WordPress users may:
I believe you're saying jQuery noConflict is the issue here, right? Also - you can't deregister jQuery in the admin anymore. |
@gideonheilbron that is not a good solution, as it may break any wordpress plugins that rely on jQuery Wordpress. It is bad practice to refer to $ anyways as it can be used for other libraries, not only jquery. I've seen it mentioned from time and time again (eg. http://www.sitepoint.com/10-tips-better-jquery-plugins/ #4) |
Ok guys, I tried to fix the non AMD jQuery requirement in order to not break things in Wordpress. Could you have a try at this version please? -> https://raw.githubusercontent.com/guillaumepotier/Parsley.js/master/dist/parsley.js |
just tested on fresh wordpress install, yup it works (bottom left is the form): http://imgur.com/rGq4ssf,bV97Oy0 In comparison, ver 2.0.2 parsley.min.js (downloaded from the site) gave an error as shown: |
Great, I just released it as 2.0.3. Thanks guys for your feedbacks, enjoy! |
thanks!! |
Thanks a lot!
|
I am still having this issue with the latest version of WordPress, Bones theme, and the latest Parsley.js How is that possible? |
But this is the official Parsley.js repo. |
Yep, you're right. I got confused. I'm using Parsley 2.0.6, built just a few days ago. Did something change that would break this? |
I'm not familiar with wordpress, but did you include jQuery? |
Btw, parsley require attributes still work, without calling
But, data-parsley-equalto="#password" , for example, does not work. Plus, I get
if I try to call the above |
jQuery is included in WordPress by default. |
Can you provide a link? |
I wish I could, but it's a private project. 💩 Sorry, I know that doesn't help. |
Thanks @marcandre. Changing the document ready function fixed my problem. |
including parsley.min.js with a regular Wordpress install will cause an 'undefined is not a function', since the file is using $ to reference jQuery.
The text was updated successfully, but these errors were encountered: