Woocommerce checkout accordion jQuery not work

On the Woocommerce checkout page iv tried to add an jQuery accordion to the shipping address section, the JS isnt working! works on other pages apart from this one…

any one got an idea how to fix?

Read More

Template HTML:

<h3 class="toggle-trigger" style="clear:none;">
    <a href="javascript:void(0)" class="tr ">
        <?php _e( 'Shipping Address', 'woocommerce' ); ?></a>
</h3>
<div class="toggle-container" style="display:none;">
    <div class="toggle-block"> ... content form ... </div></div>

JS code:

// Toggles
jQuery(".toggle-container").hide();
jQuery(".toggle-trigger").click(function(e){
    e.preventDefault;
    jQuery(this).toggleClass("active").next().slideToggle(100);
    return false;
});

Related posts

Leave a Reply