Question: In our page we have a slew of anchor tags to which we dynamically attach click handlers. In such a case what is the best way to keep an anchor tag in the mark up?

Currently we have

```
<a href="javascript:void(0);" >....</a>

```

We need void value for href as some of them may not get attached with click handlers.

Answer: 
Ommit the href-attribute and when assigning the onclick also set the cursor-style of the elements to "pointer" , otherwise users with JS disabled will be confused when clicking on the elements and nothing happens.
The simpler code would be like this:

```
<a href='#' class='do-stuff'>Link</a>

```

The "#" sign keeps the html code clean, and readable

```
jQuery(document).ready(function() {

  jQuery(".do-stuff").click(function() {
    alert("clicked"); 
    return false; // disables default link action
  });

});

```