jquery.appear
jquery.appear copied to clipboard
Added optional scrollable viewport other than window
I added the ability to pass in scroll_selector, such as '#people'. Also refactored static "check_binded" variable to be stored as data on the scrollable element.
Hi @dopa I am using your proposed code in my fork and found a bug:
You need to declare the opts
var in the top scope otherwise calling $.force_appear()
will throw an exception for an undefined variable opts
. I use var opts = defaults = ...
to avoid exceptions in case $.force_appear()
is called before any $.appear()
call.