Jump to content

move images from left to right


Pawan_Agarwal

Recommended Posts

I am working on code that can run images from left to right when I click on hyperlink ?? The code is listed below, please help me out ...

 

 

<script type="text/javascript">
var left3;
function next1()
{
var str = document.getElementById('pic01');
var left2 = parseInt(str.offsetLeft);
left3 = left2;
}
 
function next2()
{
left3 =left3 + 50;
var st = left3+'px';
document.getElementById('pic01').offsetLeft=st;
}
</script>
 
<body onLoad="next1()">
<img src="pic1.jpg" height="100px" width="120px" style="margin-left:125px;" id="pic01"/>
<br><br>
<a href="#" style="margin-left:100px" onClick="next2()">Next</a>
<body>
Link to comment
https://forums.phpfreaks.com/topic/279776-move-images-from-left-to-right/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.