I am trying to setup an event function to react on clicked links in a menu, but unfortunately its not working.
This is JS code:
$('#menu a').click(function() {
return "Do you really want to leave now?";
});
And the HTML bit:
<div id="menu">
<a href="#"> Link1 </a>
<a href="#"> Link2 </a>
</div>
It seems quite straight forward, but unfortunately not working.
JS fiddle: http://jsfiddle.net/Kdvk3/6/