Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Organic-Tabs: Start with tabs closed

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #45456
    jukoegel
    Member

    Hey,
    thanks to Chris and his tutorial we have the Organic Tabs jQuery plugin ([https://css-tricks.com/organic-tabs/](https://css-tricks.com/organic-tabs/https://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)
  • The forum ‘JavaScript’ is closed to new topics and replies.