How can I fire an event if a CSS class is added or changed using jQuery?
Does changing of a CSS class fire the jQuery change() event?
How can I fire an event if a CSS class is added or changed
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.
Whenever you change a class in your script, you could use a
triggerto raise your own event.but otherwise, no, there’s no baked-in way to fire an event when a class changes.
change()only fires after focus leaves an input whose input has been altered.More info on jQuery Triggers