I have the following snippet which works as expected:
<a href="http://google.com" onclick="return false;">Will go to google</a>
Clicking on the href does not take me to google.
But... if I include JQuery 1.4 and wire up a live click event to anything on the page (whether it exists or does not) this unrelated event handler stops working as expected in IE (and continues to work in firefox and chrome). Return false is ignored and instead clicking on the link takes you to google.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$(".not-here").live("click", function() {alert("hi"); return false; });
});
//]]>
</script>
Whats going on? Have I come across a bug in the JQuery 1.4 release.