In my website I have buttons that are loaded via AJAX. How can I ensure that my jQuery hide()
operation is applied to all buttons that are inserted into the DOM in future?
As far as I know on()
works only when you register events like click for example.
<button class="myButtton">Button</button>
JavaScript:
$(".myButton").hide();