STYLE SWITCHER

jQuery.appear

jquery_black
This plugin can be used to prevent unnecessary processeing for content that is hidden or is outside of the browser viewport. It implements a custom appear/disappear events which are fired when an element became visible/invisible in the browser viewport.
$('someselector').appear(); // It supports optional hash with "force_process" and "interval" keys. Check source code for details.

    $('<div>test</div>').appear(); // It also supports raw DOM nodes wrapped in jQuery.

    $('someselector').on('appear', function(event, $all_appeared_elements) {
      // this element is now inside browser viewport
    });
    $('someselector').on('disappear', function(event, $all_disappeared_elements) {
      // this element is now outside browser viewport
    });

Website

Recent Article

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Keep your skills sharp, get informed.

    Subscribe to our mailing list and get interesting stuff and updates to your email inbox