Reputation: 2177
Jquery on click event is not working on dynamically added Custom tags
My code is
$("[addtoShip='yes']").on('click', function() {
alert('Ship added')
});
Href for <a href="#" addtoShip='yes' myVal="10235">
add more to Ship</a>
I am trying using .on
But still it's not working
Upvotes: 0
Views: 81
Reputation: 87203
$(document/CommonParentSelector).on('click', "[addtoShip='yes']", function () {
alert('Ship added')
});
Upvotes: 1