javascripthyperlink

Hide status bar value from href url when mouse hover a link


This is the link that I have:

href='" . $ajax_like_link . "' data-task='like' data-post_id='" . $post_id . "' data-nonce='" . $nonce . "'>";

And I want to replace the displayed link value from status and set to javascript:void(0).

How can I accomplish this?


Solution

  • Try this:

    <a href="javascript:void(0)" onclick="location.href='" . $ajax_like_link . "'">Link</a>