Wordpress
Posted
By
John Crenshaw
|
Published
October 16, 2014
A quick note on using jQuery with WordPress for those having any trouble with it. I decided to use wp_enqueue_script() to include the jQuery library in a recent project and discovered the jQuery code wouldn't do anything.
After a bit of searching, I discovered the solution was to replace all the "$()" in my jQuery code with "jQuery()".
Apparently, in order to prevent collisions with the Prototype javascript framework, which also uses "$()", you have to use jQuery() instead of $() for all your jQuery functions to work with wp_eneque_script().
Never miss an update
Get more training, case studies and ideas delivered directly to your inbox.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
There’s More
Posts you might also like