🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

The Visible.js jQuery element visible detection plugin which utilizes MutationObserver to execute a callback function when an element gets visible or invisible.

Viewport callback Visibility

Documentation

Visible.js

jQuery Visible/Unvisible Plug-in based on DOM listener and independent from way of visibility changing.

It generates becameVisible and becameUnvisible events that can be catched by jQuery:

...  $('#my_tag').on('becameVisible', function() {     alert('Visible'); });  $('#my_tag').on('becameUnvisible', function() {     alert('Unvisible'); });  ... 

See this example (run).

Supported browsers

All browsers, that supported by jQuery AND Mutation Observer:

  • Firefox 59+
  • Chrome 49+
  • Chrome for Android 66+
  • IE 11+
  • Edge 16+
  • Safari 11.1+
  • iOS Safari 10.3+

Requirements

  • jQuery 1.7.0+

License

Distributed under MIT License.


You May Also Like