jQuery scroll a div up and down using two buttons

后端 未结 4 2219
执念已碎
执念已碎 2021-02-10 13:45

I have a simple set of two buttons that when hovered should make a div move up and down to simulate a scrolling effect:

$(\"#down\").hover(function () {

    $(\         


        
4条回答
  •  一个人的身影
    2021-02-10 14:34

    I've written the jQuery plugin jquery.scrollbuttons which should fit your needs. It has a page on github and an examples page.

    The only thing the plugin will not do is to hide the button when scrolling is finished. If you still need this feature, I can easily add it.

提交回复
热议问题