All Projects → moagrius → Isonscreen

moagrius / Isonscreen

Licence: mit
Simple jQuery plugin to determine if an element is within the viewport

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Isonscreen

Viewport.jquery
viewport.jquery - simple but handy jQuery plugin adding methods and CSS selectors to check if element is in certain viewport
Stars: ✭ 156 (+35.65%)
Mutual labels:  viewport, jquery-plugin, jquery
Stickystack.js
A jQuery plugin that creates a stacking effect by sticking panels as they reach the top of the viewport.
Stars: ✭ 287 (+149.57%)
Mutual labels:  viewport, jquery-plugin, jquery
Isinviewport
An ultra-light jQuery plugin that tells you if an element is in the viewport but with a twist.
Stars: ✭ 646 (+461.74%)
Mutual labels:  viewport, jquery-plugin, jquery
Jquery Udraggable
make elements draggable by mouse or touch
Stars: ✭ 107 (-6.96%)
Mutual labels:  jquery-plugin, jquery
Pg Calendar
📆 beautiful and eidetic date picker
Stars: ✭ 109 (-5.22%)
Mutual labels:  jquery-plugin, jquery
Multipicker
Form styling plugin for jQuery
Stars: ✭ 90 (-21.74%)
Mutual labels:  jquery-plugin, jquery
Jquery Mosaic
A jQuery plugin to build responsive mosaics of images or any other content fitted to match heights in multiple rows while maintaining aspect ratios. http://jquery-mosaic.tin.cat
Stars: ✭ 80 (-30.43%)
Mutual labels:  jquery-plugin, jquery
Ihavecookies
jQuery plugin to display cookie consent message (EU regulation)
Stars: ✭ 106 (-7.83%)
Mutual labels:  jquery-plugin, jquery
Translucent
Translucent plastic card theme.
Stars: ✭ 93 (-19.13%)
Mutual labels:  jquery-plugin, jquery
Jquery Sortablejs
A jQuery binding for SortableJS
Stars: ✭ 94 (-18.26%)
Mutual labels:  jquery-plugin, jquery
Footer Reveal
A jQuery plugin for easy implementation of the 'fixed/reveal' footer effect. Demo here:
Stars: ✭ 111 (-3.48%)
Mutual labels:  jquery-plugin, jquery
Jquery Scrolllock
Locks mouse wheel scroll inside container, preventing it from propagating to parent element
Stars: ✭ 109 (-5.22%)
Mutual labels:  jquery-plugin, jquery
Popup Maker
Popup Maker plugin for WordPress
Stars: ✭ 87 (-24.35%)
Mutual labels:  jquery-plugin, jquery
Gdb
Generic Data Binder (GDB) for jQuery is a framework agnostic and extremely easy to use 2 way data binder. GDB binds views and models in realtime with live two-way binding and no hefty framework necessary.
Stars: ✭ 90 (-21.74%)
Mutual labels:  jquery-plugin, jquery
Tui.calendar
🍞📅A JavaScript calendar that has everything you need.
Stars: ✭ 9,537 (+8193.04%)
Mutual labels:  jquery-plugin, jquery
Basictable
Basic Table jQuery or Vanilla JS plugin for simple responsive tables.
Stars: ✭ 94 (-18.26%)
Mutual labels:  jquery-plugin, jquery
Pretty Dropdowns
A simple, lightweight jQuery plugin to create stylized drop-down menus.
Stars: ✭ 96 (-16.52%)
Mutual labels:  jquery-plugin, jquery
Imgnotes
Extension of the jQuery imgViewer plugin to add markers and notes to the image
Stars: ✭ 98 (-14.78%)
Mutual labels:  jquery-plugin, jquery
Dropdown
a lightweight dropdown of jQuery plugins
Stars: ✭ 105 (-8.7%)
Mutual labels:  jquery-plugin, jquery
Swiftype Search Jquery
Elastic Site Search jQuery search plugin
Stars: ✭ 74 (-35.65%)
Mutual labels:  jquery-plugin, jquery

#jQuery.isOnScreen

Simple jQuery plugin to determine if an element is positioned within the viewport. It does not test any other type of "visibility", like css display, opacity, presence in the dom, etc - it only considers position.

Current version returns true if at least 1 pixel is visible on screen.

An optional callback argument is accepted, that is passed the number of pixels visible on each edge - the return of that callback is used, if provided. The callback is called from the scope of the current node.

Some examples:

Returns true if element has at least 1 pixel within the viewport:

$('selector').isOnScreen();

Returns true if at least the top 10px of the element's vertical area is in the viewport:

$('selector').isOnScreen(function(deltas){
  return deltas.top >= 10 && deltas.bottom >= 10;
});

Returns true if at least the top 10px of the element's vertical area above the bottom of the viewport.

$('selector').isOnScreen(function(deltas){
  return deltas.top >= 10;
});  

Returns true if the element is within 100px of the bottom of the viewport (and so technically is still not "visible" - this can be useful for loading content when you expect a user to see it shortly, for example during a fling action or in an infinite scroll application).

$('selector').isOnScreen(function(deltas){
  return deltas.top >= -100;
});          

Returns true if the element's vertical space is entirely within the viewport:

$('selector').isOnScreen(function(deltas){
  return deltas.top >= this.height() && deltas.bottom >= this.height();
});

Return true if the element is entirely within the viewport:

$('selector').isOnScreen(function(deltas){
  return deltas.top >= this.height() 
    && deltas.bottom >= this.height()
    && deltas.left >= this.width()
    && deltas.right >= this.width()
});

Returns true if the element is above the bottom of the viewport at all (at least 1 pixel is showing, or the element is above the viewport and not actually visible).

$('selector').isOnScreen(function(deltas){
  return deltas.top >= 0;
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].