Validating a null link in HTML -
this question has answer here:
- is ok have empty anchor tag? 5 answers
is valid html?
<a href="#" id="whatever">home</a>
i'm using id call jquery function id of "whatever." can't find says whether valid. i'm having debate whether is.
also, valid html have radio button group without 1 selected?
your html valid.
just suggestion, jquery function should prevent default behavior of anchor tag:
jquery("#whatever").click(function(evt) { evt.preventdefault(); // prevent default anchor tag behavior // need here });
this way prevent common "scroll-to-top" behavior when using href="#"
.
Comments
Post a Comment