Skip to content

gijsroge/offscreen.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

offscreen.js

Detects if an element falls of the right side of your screen

What does it do?

Adds a class "offscreen" to all your elements with the defined selector that fall of the right side of the screen.

  • checks all the elements with the defined selector.
  • rechecks everything when resize (optimized resize)
  • smartresize to increase performance
  • customize classes

Usage:

$( document ).ready(function() {
  $('.tooltip__content').offscreen({
    smartResize: true,
    rightClass: 'right-edge',
    leftClass: 'left-edge'
  });
});   

Requires:

jQuery

@GijsRoge

About

Detects if an element falls of the viewport of your screen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published