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?
you can do it by calling javascript function instead of link in href:
Try this:
You can set the status with
window.status=''
but most browsers will block attempts to change the status line by default for security reasonsSo a better way is to
a more shorter syntax of doing this is
and there are many other ways of doing this, you can create a jquery function and just put the url in the attibute. e.g