jQuery link click href value

I've wrote these words on google. And I don't find the exact solution.

The problem:
What Should I write in the href? If I write # sign then browser go to the top of page. I wouldn't like to go to the top of page.

Here is the HTML:

<a href="#" id="example" >Click</a>

jQuery code:

$('#example').click(function() {
  return false;

return false;
command is the key. When use this return value. The links lost their default behavior.

Add new comment