Grow your CSS skills. Land your dream job.

Organic-Tabs: Start with tabs closed

  • # June 11, 2013 at 7:30 pm

    Hey,
    thanks to Chris and his tutorial we have the Organic Tabs jQuery plugin ([http://css-tricks.com/organic-tabs/](http://css-tricks.com/organic-tabs/ “http://css-tricks.com/organic-tabs/”)) and I’m working on implementing it on my website.

    For my design it is crucial that all tabs are “closed” when the page initially loads. The default is, however, to display the first tab (the a element with the class=”current”). I was wondering whether there is a quick way to change that.

    I just started to use jQuery, but I believe the central problem is that a new tab is only expanded if it is not the old tab.

    if ((listID != curList) && ($(“:animated”).length == 0)) {

    That makes sense, however, when initially hiding all tabs it makes the first tab (which has the class current) “unclickable”.

    Thank you very, very much!

    PS: [Here is the code on CodePen.](http://cdpn.io/JzFxa “Here is the code on CodePen.”) However, I didn’t know how to call the plugin there – it wasn’t even working with the original code.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".