• Resolved mosabua

    (@mosabua)


    How can I define the default tab that is open. Or is it always the first?

    It would be great if something like this would work (the default argument in tab2):

    [tabs]
    [tab title=”Tab 1″]
    Tab 1 content here
    [/tab]
    [tab title=”Tab 2″ default]
    Tab 2 content here
    [/tab]
    [/tabs]

    thanks werner

    https://ww.wp.xz.cn/plugins/arconix-shortcodes/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Gardner

    (@jgardner03)

    Hi Werner,

    Thanks for using my plugin. The default is always the first tab as I don’t currently support defining the default tab. I’ll look at adding that in a future version. If you’d like to set your defaults you can do so via some jQuery. If you copy wp-content/plugins/arconix-shortcodes/includes/arconix-shortcodes.js to the root directory of your theme (which will protect your changes when updates are made to the plugin) you can edit line 48 and add initialIndex as an additional parameter:

    jQuery('ul.arconix-tabs').tabs('div.arconix-panes > div', {initialIndex: 1});

    Just remember when setting that initialIndex param that it’s zero-based (0 is the first tab, 1 is the second, and so on).

    Does that make sense?

    Thread Starter mosabua

    (@mosabua)

    Hi, sorry for the long delay. It makes sense but I have different tabs (some in the editor, some are coded in page templates) on the site so it would interfere with the other tabs as well.

    So my solution was to use the “Category Order and Taxonomy Terms Order” plugin and sort them so that the default is the first tab.

    thanks werner

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Default tab’ is closed to new replies.