jQuery plugin for observing html element's property changes
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
tests
README.md
jQuery.AttributeObserver.js

README.md

jQuery AttributeObserver Gittip

jQuery AttributeObserver allow developer to bind handler to listen to HTML element's attribute changes.

Usage

$('#el').AttributeObserver(attr || callback, callback, [delay]);

//Or in the real word:

$('title').AttributeObserver('text', function(oldValue, newValue){
	alert(['Page title changed from ',oldValue,' to ',newValue].join(''));
}, 1000);

//This only works with iFrame on the same domain
$('iframe').AttributeObserver('src', function(oldValue, newValue){
	alert(['iFrame src changed from ',oldValue,' to ',newValue].join(''));
}, 1000);

Donate

Donate Bitcoins