Menu Collapsed Menu by Default

Home Forums SKT Full Width Forum Menu Collapsed Menu by Default

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2918
    V Allen DillonV Allen Dillon
    Participant
    • Topics: 5
    • Replies: 10
    • Total: 15
    Member since: December 13, 2014

    Good Evening,

    I would like to have the menu collapsed by default and then clicked to expand. I read through older post and found the same question but the solution isn’t working for me. I add the line of code jQuery( “.show_hide_header” ).hide(); and the menu collapse/expand button stops working. Has something changed ? Should the instructions in older post still work?

    Thank you in advance

    #2921
    Sonl SinhaSonl Sinha
    Keymaster
    • Topics: 10
    • Replies: 6987
    • Total: 6997
    Member since: June 12, 2013

    Hi,

    hide navigation default in full width pro:
    find custom-functions.php file in inc folder of your theme directory
    Path: /wp-content/themes/skt_full_width_pro/inc
    open custom-functions.php and add this code after line no. 29
    jQuery(‘.show_hide_header’).css(‘display’,’none’);

    That’s it.

    Regards,
    Shri

    #2926
    V Allen DillonV Allen Dillon
    Participant
    • Topics: 5
    • Replies: 10
    • Total: 15
    Member since: December 13, 2014

    Good Morning and Thank YOu for the quick reply,

    I inserted the code as suggested but the menu is still expanded at start up and with the code in place the collapse function stops working. Below is were I inserted the code:

    add_action(‘wp_head’,’hook_custom_javascript’);

    function hook_custom_javascript(){?>

    <script>

    jQuery(document).ready(function() {

    jQuery(‘.show_hide_header’).css(‘display’,’none’);

    jQuery(“#header-bottom-shape”).click(function(){

    if ( jQuery( “.show_hide_header” ).is( “:hidden” ) ) {

    jQuery( “.show_hide_header” ).slideDown(“slow”);

    } else {

    jQuery( “.show_hide_header” ).slideUp(“slow”);

    }

    jQuery( this ).toggleClass(‘showDown’);

    });

    jQuery( “#site-nav li:last” ).addClass(“noBottomBorder”);

    jQuery( “#site-nav li:parent” ).find(‘ul.sub-menu’).parent().addClass(“haschild”);

    });

    </script>

    Anything else I can try or look at?

    Thank you again for your help

    http://www.culpeppersteakhouse.com

    #2932
    Sonl SinhaSonl Sinha
    Keymaster
    • Topics: 10
    • Replies: 6987
    • Total: 6997
    Member since: June 12, 2013

    Hi,

    If you can send us WordPress admin details via email: [email protected] we will check this for you.

    Also i guess the inverted commas are not properly done. May be that is an issue. Well anyways just send us admin details we will take care of it.

    Regards,
    Shri

    #2934
    V Allen DillonV Allen Dillon
    Participant
    • Topics: 5
    • Replies: 10
    • Total: 15
    Member since: December 13, 2014

    Thank you Shri,

    I tested your suggestion and used the following code and all is working great.

    jQuery(“.show_hide_header”).css(“display”,”none”);

    This made the webpage on the pc just the way I was hoping but on iOS devices the menu disappeared, so I had to go back to standard menu. I’ll email admin details to you.

    Thank you again

    #16073
    Muhammad ZakirMuhammad Zakir
    Member
    • Topics: 1
    • Replies: 2
    • Total: 3
    Member since: October 11, 2015

    Hi Shri,

    I use same the code that you suggest, it’s work.

    But i have problem with responsive layout for mobile, the button expand menu do not show, how to fixed ?

    Thank you

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.