Is there a distinction between
<a href="javascript:;"></a>
and
<a href="javascript:void(0);"></a>
?
I am looking to create a link-styled button that triggers a JavaScript function when clicked, so I implement the following:
$('<a>', {
'href': 'javascript:;',
text: 'Click me',
click: doStuff
});
While I am aware that this can be accomplished using the button
tag and CSS, I believe this approach is much simpler.