I have a modal with the following code to close it
a#modalclick.icon.icon-close.pull-left href="#mymodal"
I want to know when the x icon is clicked and the modal closed so I can do something with the link id.
My javascript is;
$('#modalclick').on('click', function(event) {
console.log('clicked')
});
but it's not recognising the modal being clicked closed...
Have you tried using .not(':visible') ?