i am having difficulty making my jquery functions operate within wordpress.
can anyone help out with why these should work normally but not in wordpress???
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems like you have to load the script using
wp_enque_script. You can find the documentation for this function and for loading scripts in WordPress in general at the codex page forwp_enque_script. Furthermore, I found an article on Using jQuery with WordPress that provides sample code for the loading of the script and then the use of it.If you look at the Codex documentation, it says:
So to be able to use the
$()function as usual, you have to doFor an example of what that looks like, look at step 2 of the Themocracy article linked above.
I’m pretty sure you’ll be fine with these resources, hope they help.