This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Javascript

10 years ago · Last reply by Andrew Misplon 10 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Andrew Misplon Staff 10 years, 4 months ago

    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. evilmc 10 years, 4 months ago

    I add script, but again not works :/

  3. Andrew Misplon Staff 10 years, 4 months ago

    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.

Have a different question or issue?

Start New Thread