 <p>Seems you forgot to add the html code</p> <p>From the code you have provided, I can only assume you should write this:</p> <pre><code>if ( Image_Number &gt; 0 ) { $("html_item_that_contains_image").fadeOut(); document.my_imagearray.src = Image[Image_Number]; $("html_item_that_contains_image").fadeIn(); } </code></pre>