Document ready script in wphead

Community Forums Forums Design Tips and Tricks Document ready script in wphead

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Susan 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #80252


    I have a script (below) that was added to the wp_head() in the genesis theme settings area. It causes the accordian to work on the page. My issue is that I want to have the script load from the functions.php so I don’t have to have it in the theme settings area. Everytime I try the enque scripts function the accordian stops working.


    //Add Inactive Class To All Accordion Headers

    //Set The Accordion Content Width
    var contentwidth = $(‘.accordion-header’).width();

    //Open The First Accordion Section When Page Loads

    // The Accordion Effect
    $(‘.accordion-header’).click(function () {
    if($(this).is(‘.inactive-header’)) {

    else {

    return false;


    This reply has been marked as private.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.