peopleuyfs
New Member
I have 3 images on my page and they are aligned in a line and I have an image that is draggable on the x axis. What i want to do is that when i drag the slider the body scrolls to left and right.HTML Code\[code\]<div id="slider" style="width:3200px; padding: 0;"><img border="0" src="http://stackoverflow.com/questions/15563931/asd.jpg" width="558" height="500" /><img border="0" src="http://stackoverflow.com/questions/15563931/baba dedo.jpg" width="558" height="500" /><img border="0" src="http://stackoverflow.com/questions/15563931/picccccture 3.jpg" width="558" height="500" /></div><div id="draggable"> <p>Drag me to my target</p></div>\[/code\]CSS Code\[code\]img { float: left; }#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 auto; }\[/code\]JS\[code\]$('#draggable').draggable( { axis : 'x' }});$('#draggable').click(function(){ $("html, body").stop().animate({ scrollLeft : '558px' }, 3000);});\[/code\]How can i do this?Any help would be appreciated