Jump to content

move images from left to right


Go to solution Solved by 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...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.