/* jQuery Watch Plugin @author Darcy Clarke @version 2.0 Copyright (c) 2012 Darcy Clarke Dual licensed under the MIT and GPL licenses. ADDS: - $.watch() USES: - DOMAttrModified event FALLBACKS: - propertychange event - setTimeout() with delay EXAMPLE: $('div').watch('width height', function(){ console.log(this.style.width, this.style.height); }); $('div').animate({width:'100px',height:'200px'}, 500); */ (function(d){"function"===typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],d):d(jQuery)})(function(d){d.extend(d.fn,{watch:function(b,c,a){var f=document.createElement("div"),j=function(a,b){var a="on"+a,c=a in b;c||(b.setAttribute(a,"return;"),c=typeof b[a]=="function");"onpropertychange"==a&&d.browser.msie&&d.browser.version>=9&&(c=!1);return c};typeof c=="function"&&(a=c,c={});typeof a!="function"&&(a=function(){});c=d.extend({},{throttle:10},c);return this.each(function(){var g= d(this),i=function(){for(var a=g.data(),b=!1,c,f=0;f