Javascript code inside post

Posted in: Newspaper
Post count: 3

How I can insert Javascript code inside post?

I tried the following code:

<script type=”text/javascript”>// <![CDATA[ function showBuyLink() { document.getElementById(“buylink”).style.display = “block”; setTimeout(“showBuyLink()”, 300000);} // ]]></script>

But when I publish the post. The code changes
the last > converts into >

Can someone please help me out.

Thanks

Post count: 623

Hello drsam,

Go through this – https://www.godaddy.com/garage/webpro/wordpress/3-ways-to-insert-javascript-into-wordpress-pages-or-posts/

Hope this will help you.
All the best

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.