Skip to content
Advertisement

Get href on click and redirect with shortcode

I’m working with this idea: get href onclick and redirect with link Because i need a link redirect to another page.

My problem is that the second page is dinamic. For it, i use a shortcode. But im not know how i can do for it works. The var yourHTML is not working.

JavaScript

Advertisement

Answer

You should use event.preventDefault(); to cancel the default redirection

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement