[resolved] adding javascript (5 posts)

  1. Jomez
    Posted 2 years ago #

    I want to add a small simple jquery-script to my site.
    I checked the "Site-specific JS" checkbox; but when I add my scripts in script-starter.js nothing happens. Even an alert-message for testing does not respond. Can someone tell me if I am doing something wrong in adding javascript?

  2. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    Are you using some browser developer tool like Firebug so that you can get access to the browser's console log?

  3. Jomez
    Posted 2 years ago #

    Okay; I just found out I have to rename script-starter.js to script.js.
    Now it works.

  4. joga3001
    Posted 2 years ago #

    Hi, I have similar issue:

    I checked the "Site-specific JS" checkbox, I rename script-starter.js to script.js and add the code in the footer (<script type='text/javascript' src='http://my-site.com/wp-content/themes/boilerplate/js/script.js'></script>) but it still not working... what else do I need to do?

    the version of my theme is 4.4.1

  5. Aaron T. Grogg
    Theme Author

    Posted 2 years ago #

    @joga3001: you shouldn't have to add any code to the page, checking the "Site-specific JS" checkbox should add the <script> tag to the page for you.

    and that should just do it...

    you have a URL i could look at?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.