WordPress.org

Ready to get started?Download WordPress

Forums

Tabbed Widgets
How to create to all tabs be close by default (7 posts)

  1. dados
    Member
    Posted 2 years ago #

    Hi,

    I want to create to all tabs be close by default, I do not need option default open tab... What I need to change in script...

    Thanks

    http://wordpress.org/extend/plugins/tabbed-widgets/

  2. dados
    Member
    Posted 2 years ago #

    any replay?

  3. dados
    Member
    Posted 2 years ago #

    Hmm... really.. Nobody???

  4. drann
    Member
    Posted 1 year ago #

    Hi,
    yes ther's a way:
    go to widgets>Tabbed Widgets>modify
    open tabbed-widgets/js/init-plugin.js
    and change this

    if ($was_open) {
    			if ($was_open.split('-')[0] == $widgetid) {
    				$start_tab = parseInt($was_open.split('-')[1]);
    				var $open_previous = true;
    			}

    by that

    if ($was_open) {
    			if ($was_open.split('-')[0] == $widgetid) {
    				$start_tab = parseInt($was_open.split('-')[0]);
    				var $open_previous = false;
    			}
  5. dados
    Member
    Posted 1 year ago #

    thanks

  6. drann
    Member
    Posted 1 year ago #

    Hm. no. don't work...

  7. drann
    Member
    Posted 1 year ago #

    Finally, what I did is to put a fake first tab in the widget, and add for the class .tw-widget-first something like that:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    .tw-widget-first{
        color: transparent;
        display: block;
        font-size: 1px;
        height: 0.001em;
        line-height: 0.001em;
        padding-left: 300px;
    }

    It's not very clean, but it works...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic