/* 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 g=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 f= d(this),i=function(){for(var a=f.data(),b=!1,c,d=0;d