Home>Support>Javascript

Javascript

Where I can put JS?

‘Here is the Javascript. You can put this in your custom.js file or in the head of your theme.

Important: make sure you are already including the jQuery library as it is needed for the rest of the js to work”

jQuery(function($){
$(document).ready(function(){
$(".toggle_container").hide();
$("h3.trigger").click(function(){
$(this).toggleClass("active").next().slideToggle("normal");
return false; //Prevent the browser jump to the link anchor
});
});
});

I need this for this toggle shortcode:

http://www.wpexplorer.com/wordpress-toggle-shortcode/

Thanx

URL: https://iphone-otkljucavanje.com

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi Evilmc

    Give the following plugin a try:

    https://wordpress.org/plugins/header-and-footer-scripts/

    The script you’ve listed above will need to be wrapped in a script tag:

    <script>
    
    /// Your script goes in here.
    
    </script>
    

    Header and Footer Scripts plugin will provide a field for you to use.

  2. 8 years, 11 months ago evilmc

    I add script, but again not works :/

  3. 8 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi :)

    Inserting the script is one challenge, sounds like we’ve made progress with that.

    Getting the script to work is ideally something that would need to happen on your side, it’s more of a custom development task.

    If you need toggles then I’d recommend a plugin like this:
    https://wordpress.org/plugins/whistles/

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More