Viewing 2 replies - 1 through 2 (of 2 total)
  • You should always use <script> inside the <head></head> of your page like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Hi theret</title>
    <script type="text/javascript">
    </script>
    </head>
    
    <body>
    </body>
    </html>
    Thread Starter yaghi83

    (@yaghi83)

    Thank you Kampflebkuchen,

    I was able to resolve the issue by removing code tags wordpress adds to the code script:

    // <![CDATA[
    ….
    and // ]]>

    between <script></script>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Implementing javascript in wordpress page’ is closed to new replies.