I have links inside <td>s, but I also have a click event on all <td>s. The code looks like this:
$( document ).ready( function() {
$( 'td.event' ).click( function() {
var eventName = prompt( 'Enter event:' );
if ( eventName != null && eventName.length > 0 ) {
window.location = '?event=' + eventName;
}
} );
} );
I want to simply follow the link without showing the popup if the user clicks the link, but to show the popup if the user clicks anywhere else in the <td>. Is this possible in JQuery?
Add this to the end of your
document.readyhandler: