1

I'm looking for a way to create an event listener to a DOM object style.display property and fire a function if the property value changes.

E.g

<p id="example_p" style="display:none;">Some text</style>

I'd like that if some JS code in the page will manipulate the

display value, a function will be executed.

Is this possible?

Thanks,

Roy

Roy Peleg
  • 1,000
  • 2
  • 8
  • 25
  • can you show us your js code ? (that manipulates the display style) – Cristi Pufu Jun 21 '12 at 09:04
  • Well, its a file pulled from an external domain, its a big file. I really don't know what part of it affect the display style property, I only know that it changes when some events occur. That's why I wanted to add the listener. If you have some approaches to some scenarios, do share :-) – Roy Peleg Jun 21 '12 at 09:59
  • 1
    check this http://stackoverflow.com/questions/2157963/is-it-possible-to-listen-to-a-style-change-event – Cristi Pufu Jun 21 '12 at 10:01
  • It gave me some ideas, but it didn't really help. Other ideas? – Roy Peleg Jun 21 '12 at 17:38

0 Answers0