jQuery cycle > stop cycle when get to last item
Hi everyone !
I'm using the jQuery cycle plugin combined with the 'touchwipe' class on Ipad and i need to stop the cycle when the last item is reached.
Can anyone help me on this?
Here's the code. Cheer!
- $(document).ready(function() {
$('#docs-list').cycle({
timeout: 0,
fx: 'scrollHorz',
});
$("#docs-list").touchwipe({
wipeLeft: function() {
$("#docs-list").cycle("next");
},
wipeRight: function() {
$("#docs-list").cycle("prev");
}
});
});