Wednesday, December 23, 2009

Image Changing Next and Previous

22. a.
Image Changing Next and Pervious while Click on the button otherwise it will not move automatically because I written only on click time. This script u can use in your Project. I written only by Java script. I did not use any Framework. This is my Own Script. No Need Licences. Don’t worry about Licences. My Site Open Source Site.Just Copy below Coding and Past to your HTML page you can get Output or Result. i gave space between less than and div and End div and Greater than.

< id = " frist " style="width:350px; height:450px; overflow:hidden; position:relative; ">

< id=" first_innerdiv " style="width:350px;height:450px ; ">

< id = " a " src="1.jpg" style=""> height="350" width="450" style="display:block;" / >

< id="b" src="2.jpg" height="350" width="450" style="display:none">

< / div >

< / div >

< type="button" value="next" onclick="javascript:prev22('first_innerdiv',this)">

< type="button" value="next" id="next" onclick="next11('first_innerdiv',this)">


function next11(id,but)

{

var t_im=document.getElementById(id);

var im_arr=t_im.getElementsByTagName('img');

for(var t=0;t

{

if(im_arr[t].style.display=="block")

{

im_arr[t++].style.display="none";

Effect.Fade(im_arr[t],{ duration: 0.5, from: 0.5, to: 1 });

im_arr[t].style.display="block";

}

}

}

function prev22(id,but)

{

var t_im=document.getElementById(id);

var im_arr=t_im.getElementsByTagName('img');

for(var t=im_arr.length-1;t>0;t--)

{

if(im_arr[t].style.display=="block")

{

im_arr[t--].style.display="none";

Effect.Fade(im_arr[t],{ duration: 0.5, from: 0.5, to: 1 });

im_arr[t].style.display="block";

}

}

}


No comments:

Post a Comment