Show shortcode content onClick with JS
-
Hi,
I am trying to show the WP Phone Message form when clicking a button and I am unable to make it work.
My code is:
<a href="javascript:;" onClick="document.getElementById('hideaway').style.display='block';">WhatsApp contact form</a> <div id="hideaway" style="display: none;">[wp-phone-message]</div>It does not show anything. If I write any text there, it shows up. I don’t know why…
Could you help?
Thank you for reading this and best regards,
Alba
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Show shortcode content onClick with JS’ is closed to new replies.