Is there a way to detect if the “display” css property of an element is changed (to whether none or block or inline-block…)? if not, any plugin? Thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can. DOM L2 Events module defines mutation events; one of them – DOMAttrModified is the one you need. Granted, these are not widely implemented, but are supported in at least Gecko and Opera browsers.
Try something along these lines:
You can also try utilizing IE’s “propertychange” event as a replacement to
DOMAttrModified. It should allow to detectstylechanges reliably.