• Resolved drazon

    (@drazon)


    Is it possible to add this

    <a href="tel:......" onClick="some javascript here">...</a> at the top bar content using the customizer? It seems now that the onclick=”” is stripped out.

    • This topic was modified 6 years, 3 months ago by drazon.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Can you please tell me exactly what do you want to achieve? Can you share the code so that I can test it?

    Thread Starter drazon

    (@drazon)

    Hello,

    Go to Customizer->top bar->content and add this

    <a href="tel:11111111111" onClick="alert("Hello")">call me</a>

    the onclick part is stripped out on save

    Hi,

    Due to the security purpose, some code can’t be added directly. But you can create a template under Theme Panel > My library and display it where you want.
    Also, you can use the child theme to add your code or modify the theme file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add onClick to a tags in top bar content?’ is closed to new replies.