Skip to content

jQuery plugin for handling DOM 4 lifecycle events with Mutation Observers

License

Notifications You must be signed in to change notification settings

mateusmaso/jquery.lifecycle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.