Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inView

lightweight jQuery plugin to detect if something is in view or not. minified is ~241 bytes.

usage :

  • requires jQuery
  • include/require after jQuery
  • attatch to elements on whatever event with optional padding
    • *padding is for when something is to be considered in-view
    • defaults to 1 window height.
  • returns boolean
  • i.e. $(window).on('scroll', function(){ if($('.element').inView(0)) { ... do something ... }});
  • note: onscroll runs a lot - probably better to setInterval and whatnot on scroll - maybe use my endedEvents utility

About

jQuery plugin to detect if something is in view or not.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages