Check if checkbox is NOT checked on click - jQuery

后端 未结 8 412
心在旅途
心在旅途 2021-01-30 06:02

I want to check if a checkbox just got unchecked, when a user clicks on it. The reason for this is because i want to do a validation when a user unchecks a checkbox. Because atl

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 06:38

    Check out some of the answers to this question - I think it might apply to yours:

    how to run click function after default behaviour of a element

    I think you're running into an inconsistency in the browser implementation of the onclick function. Some choose to toggle the checkbox before the event is fired and some after.

提交回复
热议问题