jQuery object disabled event listener, how to detect when a html attribute changes

前端 未结 2 1781
傲寒
傲寒 2020-12-07 03:06

I need to make an event listener for a select tag. It should be triggered any time the element becomes disabled or enabled.

Is

2条回答
  •  攒了一身酷
    2020-12-07 03:39

    It is possible using this jquery .watch plugin.

    http://darcyclarke.me/development/detect-attribute-changes-with-jquery/

    The plugin detects for css changes, but i edited it in this JSfiddle to work for attributes.

    Check out this JSfiddle.

提交回复
热议问题