What is the best crossbrowser way to make anchor without href (javascript-driven) behave like real anchor? The most obvious one is to use # as anchor but it makes page jump…
What is the best crossbrowser way to make anchor without href (javascript-driven) behave like
Share
A do-nothing link, that doesn’t even jump:
Update: As linked document suggests (pointed out by Ambrosia), since
void(0)returnsundefined, it is better to actually write above code as:Unless, of course, undefined has been re-defined.