Medical Factors Which make it The most effective just by Sejal Kakadiya Medicine and health agencies with now consentrate on top quality, charge together with great satisfaction health of their solutions. These are typically that support beams which a lot of these agencies redefine the direction they trade. The following really results in thrilled clients. How come Serious Treatment Direction Can be a Trend Inside Medicine and health Sector just by Steven Orange A whole lot of North american healthcare systems' options are generally about that direction together with procedure with serious circumstances. Direction with serious health conditions which include diabetes, excessive circulation demand, cardiovascular disease, together with hypothyroidism can be a vital component of easiest treatment healthcare provider's succeed. Inside standard product, that general practitioner spots someone on an automobile accident with treatment, inspects that condition ...
| A simple JavaScript code (Photo credit: Wikipedia) |
I have already posted JavaScript codes for simple image slideshows without caption, with caption and Jquery fade effect animation. As some of our visitors asked how to add a next button to the slide, I have posted this JavaScript code for creating image slideshow with Navigation Buttons. It may help more for creating awesome image animations for your website or blog.
Code for Creating Image Slideshow with Navigation Buttons
Just copy and paste the code below where you want to place slideshow and change the location of the images.
<script type="text/javascript">
var i = 0;
var image = new Array();
// LIST OF IMAGES
image[0] = "image-1.png";
image[1] = "image-2.png";
image[2] = "image-3.png";
var k = image.length-1;
var caption = new Array();
// LIST OF CAPTIONS
caption[0] = "Caption for the first image";
caption[1] = "Caption for the second image";
caption[2] = "Caption for the third image";
function next(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i < k ) { i++;}
else { i = 0; }
}
function prev(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i >0 ) { i--;}
else { i = k; }
}
function swapImage(){
var el = document.getElementById("mydiv");
el.innerHTML=caption[i];
var img= document.getElementById("slide");
img.src= image[i];
if(i < k ) { i++;}
else { i = 0; }
setTimeout("swapImage()",5000);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
swapImage();
});
</script>
<table style="border:none;background-color:transparent;">
<tr>
<td>
<img onclick="prev()" title="Previous" alt ="Prev" height="25" width="15"src="prev.jpg"/>
</td>
<td>
<img name="slide" id="slide" alt ="my images" height="285" width="485" src="image-1.png"/>
</td>
<td>
<img onclick="next()" title="Next" alt ="Next" height="25" width="15" src="next.jpg"/>
</td>
</tr>
<tr>
<td>
</td>
<td align="center"style="font:small-caps bold 15px georgia; color:blue;">
<div id ="mydiv"></div>
</td>
<td>
</td>
</tr>
</table>
You Might also view the following Related Posts
Comments
Post a Comment