how to disable an html link?


<a href="/someurl" onclick="javascript:somefunction">
this link wont fire
</a>

<script>
function somefunction()
{
  return false;
}
</script>

if you don't return false it will fire.


$(element).click(somefunction);

Notice that the prefix "on" is dropped for event based functions in jquery