jQuery scrollLeft -


i looking @ tutorial @ http://jqueryfordesigners.com/jquery-infinite-carousel/. tried creating similar myself understanding, turned out more complex thought. how use scrollleft?

i created simple fiddle test http://jsfiddle.net/sryku/2/

<div id="carousel">     <div class="wrapper">         <ul>             <li><a href="#">test link 1</a></li>             <li><a href="#">test link 2</a></li> ... 

css

#carousel .wrapper {     position: relative;  ul {     position: absolute; 

js

$wrapper.scrollleft(itemsperpage * itemwidth); 

but not scrolling

you have use animate method that:

$wrapper.animate({scrollleft: itemsperpage * itemwidth}); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -