I know we can bind event to dynamically created elements like below
$('some').on('click','class/id of dynamic ele',function(){});
but how to trigger click event on dynamically created element like i have created new element in dom
<div class="one">M</div>
now how can i $( ".one" ).trigger( "click" ); ?
$(document).on('click', '.one', function() {
use this one to put click on dynamically created element
find the DOCUMENTATION for more info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With