- This topic is empty.
November 17, 2010 at 3:01 pm #30720chriswarren00Member
Hi guys, I’ve tried to post this question on both the wordpress and jquery forums and have gotten zilch. Here’s the question I posted on the WP forum:
I’m designing a theme on a local host and am trying to use a simple jquery function on my main page that cycles through a handful of images, fading between each image.
I’m loading jquery using google in my functions.php by using this:
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"), false, '1.4.4');
and I’m also doing this in the head section of my header.php, which is probably where I’m going wrong:
I’ve created a DIV with an id of ‘slideshow’ in my CSS and given it a width and a height.
if the alert don’t pop up, then you know what the problem is. I have also never seen the sleep: 2 fade: 1November 17, 2010 at 7:16 pm #74800jfreehillMember
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.
This doesn’t seem to do it. I don’t know why my post read as “/js/jquery.cross-slide.min.js”>”, it must’ve been a weird copy and paste thing. I had it typed as you suggested, but I still have no luck.
I’ve tried everything I can imagine, and this script still isn’t running. I read that there seems to be some issue regarding the $ symbol, and that it can be resolved by typing jQuery before a function–something to do with a ‘no conflict’ mode, but that doesn’t work either.
Thanks for your help, though.
- The forum ‘CSS’ is closed to new topics and replies.