mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add $.fn.scrollUp and .scrollDown
These scroll the element by a small amount up or down.
This commit is contained in:
@@ -7,6 +7,12 @@ $.fn.scrollBottom = (newValue) ->
|
||||
else
|
||||
@scrollTop() + @height()
|
||||
|
||||
$.fn.scrollDown = ->
|
||||
@scrollTop(@scrollTop() + $(window).height() / 20)
|
||||
|
||||
$.fn.scrollUp = ->
|
||||
@scrollTop(@scrollTop() - $(window).height() / 20)
|
||||
|
||||
$.fn.scrollToTop = ->
|
||||
@scrollTop(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user