I have a close font-awesome icon inside a button like so:
<button type="button" class="btn btn-sm btn-primary">
Feature A <i class="close-item fas fa-times"></i>
</button>
And since it is dynamically added to DOM I'm listening to click events on the icon like so:
$(document).on('click', '.close-item', function() {
console.log("Clicked!");
});
The goal is to listen to click events on just the icon (not the rest of the button). It works perfectly on Google Chrome but not in Firefox. How can I make this work on Firefox?
Thanks in advance.