For example, the link below launches something in jQuery, but doesn’t go to another page, I used this method a while ago.
<a class="trigger" href="#"> Click Me </a>
Please note that there is only a hash tag and usually causes the page to skip when clicked, right? [I think]. This is only for interactive materials, does not go to another page or anything else. I see that many developers are doing this.
I feel this is wrong. Is there any other recommended way to do this without using HTML attributes, as it is not intended to be used?
Do not use <button>ether because the link will not be a button.
Maybe without a hash?
<a class="trigger"> Click Me </a>
& in CSS:
.trigger {
cursor: pointer;
}
So the user still knows what you want to click?