ElementSpy 1.0
ElementSpy allows you to assign periodical checks on element attributes or other aspects of elements.
Details
- Author
- David Walsh
- Current version
- 1.0
- GitHub
- darkwing/ElementSpy
- Downloads
- 1140
- Category
- Utilities
- Tags
- Report
- GitHub Issues
How to use
ElementFilter may be initialized at any time (usually at DOMReady).
var element = document.id('my-image');
/* simple: just watch an attribute */
var spy = new ElementSpy(element,'src', {
duration: 200,
onChange: function(old,nu) { //alert when the image's SRC has changed!
alert('Image SRC changed from ' + old + ' to ' + nu);
}
});
//start spying on the image SRC!
spy.start();
For specific usage and options, please read the documentation or visit http://davidwalsh.name/js/elementspy
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus