Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problems using JQuery with WordPress Re: Problems using JQuery with WordPress

#74800
jfreehill
Member

I’m fairly sure that once you put the code to enqueue within functions, WordPress will automatically load that script into the head of the page, so it’s not necessary to put in the header.php file.

Also if your reference to the jquery.cross-slide.js script is actually as you have it written – /js/jquery.cross-slide.min.js”> – then that would definitely not be grabbing anything and should look more like this:

So take out the from the header and put in the source to the script as noted above, below the the wp_head tag.


@cybershot
I mentioned this in another post but just doing that won’t test if jQuery is loaded, just if JavaScript in general is on. You’d have to put that in the jQuery script for that to work which isn’t possible using a CDN hosted version of it. To test if jQuery is loaded grab Firebug for Firefox and type jQuery in the debug console, if it returns as function() then it’s loaded, otherwise it will give an error.