Event detect when css property changed using Jquery

后端 未结 5 1069
北海茫月
北海茫月 2020-11-22 12:30

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

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 12:54

    You can't. CSS does not support "events". Dare I ask what you need it for? Check out this post here on SO. I can't think of a reason why you would want to hook up an event to a style change. I'm assuming here that the style change is triggered somwhere else by a piece of javascript. Why not add extra logic there?

提交回复
热议问题