Javascript Slideshow
-
I have a simple slideshow that works great in basic HTML.
I’ve tried porting it over to my wordpress theme, but cannot get it to work. I believe the problem lies in the fact that image url for the slideshow is embedded in my CSS file like so:
#header_img{height:501px;background:transparent url(topsection1a.png) no-repeat scroll 0% 0%;}I’ve placed the Javascript code in my header.php file as below. The other js files are on the server where they should be.
Is there a way to get this slideshow to function while maintaining the integrity of my CSS? Thanks!!
the dev site is at http://www.babybottlebuddy.com
<!--BEGIN JAVASCRIPT SLIDESHOW CODE --> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript" src="rotate.js"></script> <script type="text/javascript" src="transition.js"></script> <script type="text/javascript"> <!-- var image1=new Image() image1.src="topsection1a.png" var image2=new Image() image2.src="topsection1b.png" var image3=new Image() image3.src="topsection1c.png" var image4=new Image() image4.src="topsection1d.png" //--> </script> <link href="jquery-1.3.2.min.js.css" rel="stylesheet" type="text/css"> <link href="rotate.js.css" rel="stylesheet" type="text/css"> <link href="transition.js.css" rel="stylesheet" type="text/css"> <!-- SECOND SET JAVASCRIPT SLIDESHOW CODE --> <script> <!-- //variable that will increment through the images var step=1 function slideit(){ //if browser does not support the image object, exit. if (!document.images) return document.images.slide.src=eval("image"+step+".src") if (step<4) step++ else step=1 //call function "slideit()" every 2.5 seconds setTimeout("slideit()",4500) } slideit() //--> </script>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Javascript Slideshow’ is closed to new replies.