Reputation:
How would you make this slider navigation bar go in loop?
I made simple jquery that just increments margin, can you think of a way of easily looping this thing?
Right now if you click enough times it blank space will be visible...
Any help appreciated.
jsfiddle: http://jsfiddle.net/utKqe/2/
//other category page, navigate through cats
$(document).ready(function() {
$('#otherleftarrow').click(function() {
$('#othermenu ul').animate({marginLeft: '-=100px'}, 200);
return false; // prevent default click action from happening!
});
$('#otherrighttarrow').click(function() {
$('#othermenu ul').animate({marginLeft: '+=100px'}, 200);
return false;
});
});
Upvotes: 0
Views: 292