I want to prevent the “#” from being used because I’m using jQuery to do something else with a plugin on click…
<a href="#" id="mylink">My Link</a>
<script>
$('#mylink').somePlugin().click(false);
</script>
The above works nicely whenever I’ve needed to block the default click.
Now I have something like this below and I want to prevent the default click behavior
<a href="#" id="mylink">My Link</a>
$('#mylink').click( function () {
// my code in here
});
I’m just not sure where/how to incorporate click(false) into the code above. Several things I’ve tried didn’t work.
I know… I feel like a newbie asking this one.
Thank-you!
You need to do: