Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Posts
    106
    Thanks
    27
    Thanked 3 Times in 3 Posts

    JQuery Tabs question

    Hi all,
    I'm using jquery tabs in my page. The code is the following

    Code:
    $(document).ready(function() {
    	$('#tabvanilla > ul').tabs({ event: 'mouseover', fx: { height: 'toggle', opacity: 'toggle' } });
    });
    I have only one question. Can I make all tabs be closed on page load? And how can I do that? Please answer just this one

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Give them all the "ui-tabs-hide" css class to begin with.

  • #3
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Ignore that answer-- here's a way that actually works! Set the "selected" option to -1.

    Code:
    $("#mytabs").tabs('option', 'selected', -1);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •