Embedding jquery code in WP head

I’m trying to run my jquery code on WP.

I use the correct hook (wp_head/admin_head) and dump the script tag in the head tag of the page after the the theme has linked jquery but it causes the following error and my script doesn’t run.

Read More

Uncaught ReferenceError: jquery is not defined

Related posts

Leave a Reply

2 comments

  1. I maybe way out of focus here – and you did not show your whole code ( which is usefull in these cases ) , but …

    from the error message :

    Uncaught ReferenceError: jquery is not defined

    maybe you need to write jQuery not jquery ( capital Q – javascript is case sensitive ) …

    That is ment for the script itself, not the dependencies of wp_enqueue_script() which do reference jQuery as jquery