Skip to content

Instantly share code, notes, and snippets.

@stanwu
Created April 26, 2021 01:10
Show Gist options
  • Save stanwu/e61156500cb259e1c69b3e68470a8d56 to your computer and use it in GitHub Desktop.
Save stanwu/e61156500cb259e1c69b3e68470a8d56 to your computer and use it in GitHub Desktop.
<script>
$('.scrollleft').click(function () {
console.log('ok')
$('#scrollbar').animate({
scrollLeft: '-=153'
}, 1000, 'easeOutQuad');
});
$('.scrollright').click(function () {
console.log('ok')
$('#scrollbar').animate({
scrollLeft: '+=153'
}, 1000, 'easeOutQuad');
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment