I don’t know why i can’t seem to get my scrollables to scroll automatically when the page loads.
I’m using JqueryTools js library to create the scrollable.
The scrollable works fine, but it doesn’t start automatically, i have to click on the next button to get it to slide, how do i get it to move after like 3 seconds.
This is my markup:
<div class="section" id="feature">
<div class="scrollable">
<div class="items">
<div>
<img src="feature_image1.jpg" alt="some image." />
<div class="caption1">
<h2>Some title</h2>
<a href="#">Continue reading…</a>
</div>
</div>
<div>
<img src="feature_image2.jpg" alt="Some image" />
<div class="caption1">
<h2>Some title</h2>
<a href="#">Continue reading…</a>
</div>
</div>
</div><!-- end of .items div -->
</div><!-- end of .scrollable div -->
<a class="prevPage browse left">Previous event</a>
<a class="nextPage browse right">Next event</a>
</div><!-- end of #feature div -->
<a class="prevPage browse left">Previous event</a>
<a class="nextPage browse right">Next event</a>
</div><!-- end of #feature div -->
My javascript that starts before the closing </body> tag is where my scripts are:
<script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script>
<script type="text/javascript">
$('.scrollable').scrollable({size: 1, clickable: false}).autoscroll({steps: 1, interval: 1000});
</script>
I don’t know what i’m doing wrong…i’ve chained the autoscroll plugin and i want intervals of 1 second…but it doesn’t happen…
The above is what i did, what i’ve tried…the scrollable works fine…but only if i click on the next or previous button…it wont start by itself and continue looping with intervals…
Any help is greatly appreciated…