News for hackers. Stuff that matters.
Re:Ask HN: Href=“#” VS href=“JavaScript:;” by savethefuture on Wednesday July 05, 2017 @05:14PM (#14706167)
There is no "correct" way to do anything in web, I would say its generally best practice or personal preference. I tend to use # and target the tag with a data attribute and use e.preventDefault(). #! from what I've seen is used for handling client-side routing. Any tag can be used as a button in javascript, as long as you target it correctly.
Re:Ask HN: Href=“#” VS href=“JavaScript:;” by optikals on Wednesday July 05, 2017 @05:46PM (#14706376)
Thank you, Sir! And please, save the Future.