Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery - Event for when an attribute of a node changes

I have a webpage with an external javascript library, and my own extra code. The external library can't be change. It manipulates dom elements, adds new ones, changes attributes (e.g. src on some <img> nodes, etc.). I am using jQuery. Is there any event handler that is fired when the value of an attribute changes of a node?

i.e. is there anyway I can detect (in jQuery) when the src of an <img> is changed (by someone else?)

like image 985
Amandasaurus Avatar asked Nov 14 '10 21:11

Amandasaurus


1 Answers

You can go for the jQuery watch plugin to detect changes in the attributes.

Check out this post too:

http://darcyclarke.me/development/detect-attribute-changes-with-jquery/

like image 194
Sarfraz Avatar answered Oct 03 '22 06:10

Sarfraz