I want to create my own event – OnPositionChange. Event implementation of course is not a problem. The point is, how to trigger it when top or left style has changed? Should I overwrite prototype of $.css() function, or is there a better solution?
I want to create my own event – OnPositionChange . Event implementation of course
Share
I was trying diffrent thing and found best solution like this:
$.prototype.css2=$.prototype.css; $.prototype.css=function( key, value ) { console.log(key); return this.css2(key,value); }With large amount of objects to check setInterval would slow down my code too much.