View Single Post
Old 01-08-2013, 05:30 PM   PM User | #10
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 454 Times in 452 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
thanks for your time and patience, rnd me. Although I suspect that what I want isn't exactly possible. I have to listen for the change to happen, and once it does happen I just want to be notified once. So it seems in this case that all the solutions really are just a variation on the theme suggested by Logic Ali - set a flag, and check if the new value is the same as the old value and if it is, change the value of the flag.

I guess I was looking for something like when using mutation events you could do

Code:
elem.addEventListener ('DOMAttrModified',function(event){ 
if(event.attrName=="style"&&event.newValue.indexOf("block")!=-1)){
//do some stuff
Or am I completely missing the point and giving up too easily?
xelawho is offline   Reply With Quote