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?