Pawan_Agarwal Posted July 2, 2013 Share Posted July 2, 2013 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> Quote Link to comment https://forums.phpfreaks.com/topic/279776-move-images-from-left-to-right/ Share on other sites More sharing options...
Irate Posted July 2, 2013 Share Posted July 2, 2013 jQueryUI provides some neat animation scripts for what you're trying to do. Quote Link to comment https://forums.phpfreaks.com/topic/279776-move-images-from-left-to-right/#findComment-1439079 Share on other sites More sharing options...
Solution Pawan_Agarwal Posted July 18, 2013 Author Solution Share Posted July 18, 2013 I did it by some way out !! Quote Link to comment https://forums.phpfreaks.com/topic/279776-move-images-from-left-to-right/#findComment-1441253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.