I\'m sure there are a million posts about this out there, but surprisingly I\'m having trouble finding something.
I have a simple script where I want to set the onC
jQuery:
$('#foo').click(function() { alert('foo'); });
Or if you don't want it to follow the link href:
$('#foo').click(function() { alert('foo'); return false; });