Steps to recreate this issue:
- Type something in the text box
- Right after typing click the button.
- I found that only onchange event was triggered.
Code:
<div>
<input type="text" onchange="console.log('onchange');$('#message').css('display','none');" >
<div id="message">
Validating
</div>
<br>
<input type="button" onclick="console.log('onclick');" value="click me">
</div>
For
onclickit is necessary to occurmouse-downandmouse-upevent due to position change of your button its not callingonclickHere is Demo for complete event.