Skip to content

Commit

Permalink
Stop front page carousel autoscroll on number button click
Browse files Browse the repository at this point in the history
  • Loading branch information
query committed Mar 1, 2011
1 parent 9f69ce1 commit a185146
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/home_carousel.js
Expand Up @@ -12,6 +12,9 @@ jQuery(document).ready(function() {
button = jQuery('<li>' + i + '</li>');
button.bind('click', function () {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));

// Stop automatic scrolling once clicked.
carousel.stopAuto();
});
tray.append(button);
}
Expand All @@ -23,4 +26,4 @@ jQuery(document).ready(function() {
jQuery(tray.children()[(index - 1) % carousel.size()]).addClass('selected');
}
});
});
});

0 comments on commit a185146

Please sign in to comment.