?
Solved

jQuery slideshow - first image not showing

Posted on 2013-06-06
3
Medium Priority
?
297 Views
Last Modified: 2013-06-06
the first image is not showing. here's a live link: www.amazinggirl.com.au

here's the html:

<div id="slideshowBox">
 <img src="img/01_big.gif" id="photo" />
 <!--span id="slideNumber"></span-->
</div>


here's the jQuery:

<!--  SlideShow  -->
<script type="text/javascript">
    var ImageArr1 = new Array("img/01_big.gif","img/02_big.gif","img/03_big.gif","img/04_big.gif");
var ImageHolder1 = document.getElementById("photo");

function RotateImages(whichHolder,Start)
{
var a = eval("ImageArr"+whichHolder);
var b = eval("ImageHolder"+whichHolder);
if(Start>=a.length)
Start=0;
b.src = a[Start];
//document.getElementById('slideNumber').textContent = "Slide "+(Start+1)+" of "+ImageArr1.length;
window.setTimeout("RotateImages("+whichHolder+","+(Start+1)+")",5000);
}

RotateImages(1,0);
</script>
0
Comment
Question by:georgehowell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Expert Comment

by:Ishaan Rawat
ID: 39225559
The first Image is not present.... that is the path of the first image is wrong...


The first image is coming this which do not exist...
http://www.amazinggirl.com.au/img/01_big.png
0
 
LVL 10

Accepted Solution

by:
Ishaan Rawat earned 1500 total points
ID: 39225565
It should be ...
http://www.amazinggirl.com.au/01_big.gif

But after the first rotation its showing the correct one..
0
 

Author Closing Comment

by:georgehowell
ID: 39226168
Thanks Ishaan
I see what I've done wrong now.. my imageresize() function is renaming every image to *_big.png
this is clashing with RotateImages() / slideshow  on page load.
I will replace all the images in the slideshow eventually, and make sure they are named *_big.png  (it's so i can have an iPhone version, where every image is replaced by *_small.png when the screen width is less than 700

Thank you for your time
Geo
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery (http://jquery.com/) 1.6 introduces .prop() (http://api.jquery.com/prop/) and .removeProp() (http://api.jquery.com/removeProp/) methods which allow modifying or removi…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question