jquery.lifecycle

0.1.2 • Public • Published

jquery.lifecycle Build Status

This library is an extension for jQuery which allows observing mutation changes.

Features

  • Support for DOM 4 Mutation Observer API.
  • Listen to insert, remove, change and subtreeChange events.

Dependencies

  • jquery.js (>= 2.1.0)

Examples

Start observing mutation events

$(element).lifecycle({
  insert: function() { ... },
  remove: function() { ... },
  change: function(attribute, value) { ... },
  subtreeChange: function(node) { ... }
});

Stop observing mutation events

$(element).unlifecycle();

License

Copyright (c) 2013-2014 Mateus Maso. Released under an MIT license.

Package Sidebar

Install

npm i jquery.lifecycle

Weekly Downloads

5

Version

0.1.2

License

none

Last publish

Collaborators

  • mateusmaso