[toggle_group], [toggle], [toggle_title], [toggle_title_closed], [toggle_title_open], [toggle_content]
With these shortcodes you can display collapsible contents. The [toggle_title], [toggle_title_open], [toggle_title_closed] and [toggle_content] shortcodes display the title and the collapsible content of a toggle and can only be used within a [toggle] shortcode. Clicking on the title expands and collapses the content.
The difference between the [toggle_title], [toggle_title_open] and [toggle_title_closed] shortcodes is that the content displayed by the [toggle_title] shortcode is always visible while the [toggle_title_open] shortcode displays its content only when the toggle is open, the [toggle_title_close] shortcode only when the toggle is closed.
The [toggle_title_open] and [toggle_title_closed] shortcodes are mostly useful if you want to display different titles when the toggle is open and closed.
A single toggle may have multiple collapsible contents and titles. In that case, clicking on any title opens or closes all collapsible contents. You can see how it works via the Live Example link below.
Toggles can be arranged in groups. Use the 'group' attribute of toggles to arrange them in groups and use the toggle_group shortcode if you want to change the default settings of a group (the minimum and maximum number of open toggles).
Attributes supported by the [toggle_group] shortcode. | |
---|---|
group | Specifies the identifier of the group whose settings you want to change. |
maxopen | Specifies the maximum number of open toggles. Default: 1. |
minopen | Specifies the minimum number of open toggles. Default: 1. |
Attributes supported by the [toggle] shortcode. | |
---|---|
open | Set whether the toggle should be open by default or not. (true | false). Default: false. |
eventtype | The type of user interaction that expands and collapses the toggle. (click | mouseover). Default: 'click'. |
connect |
Specifies the connect identifier of the toggle.
Toggles with the same connect identifier are connected.
Connected toggles behave as a single toggle.
This option is mostly useful if you want to place the toggle title and content in different areas of the page. For instance, the content at the top, the title at the bottom.
The FAQ 2 demo page demonstrates this feature. |
group | Specifies the group identifier of the toggle. Toggles with the same group identifier belong to the same group. By default, at most one toggle can open in a group and the open toggle cannot be closed but the toggle_group shortcode allows you to modify these settings. |
open_icon |
Specifies an icon for the title(s) to display when the toggle is open. Default: 'minus'. This setting can be overridden for individual titles. For a complete list of icons, see Font Icons. |
open_iconset |
Specifies the icon set that contains the icon referred by open_icon (see above). Default is an empty string.
If the value is an empty string, the theme automatically tries to find an icon set that contains the icon.
This setting can be overridden for individual titles. For the supported icon sets, see Font Icons. |
closed_icon |
Specifies an icon for the title(s) to display when the toggle is closed. Default: 'plus'. This setting can be overridden for individual titles. For a complete list of icons, see Font Icons. |
closed_iconset |
Specifies the icon set that contains the icon referred by closed_icon (see above). Default is an empty string.
If the value is an empty string, the theme automatically tries to find an icon set that contains the icon.
This setting can be overridden for individual titles. For the supported icon sets, see Font Icons. |
add_wrapper | Specifies whether the toggle shortcode should create a wrapper element around its content or not (true | false). Default is true. |
standard |
Specifies whether the standard CSS styles should be applied to the toggle or not (true | false). Default is true.
This is a convenience feature. If you need a totally custom toggle, in some cases, it makes styling easier if you turn the standard CSS styles off. |
section |
Specifies the HTML element the state-dependent CSS classes should be added to.
Possible values:
For further details, please see the section_class attribute below. |
section_class |
By default the following CSS classes are added to the wrapper elements of the toggle, toggle title and toggle content:
In most cases, this provides enough flexibility, but in some cases, it would be useful if the state-dependent CSS classes were also added to an ancestor element of the toggle.
For instance when the toggle is a floating panel and you want the page content to be narrower when the panel is open.
The "section" and "section_class" attribtes have been designed for these cases.
With the help of the "section" attribute you can specify a HTML element to which the state-dependent classes will be added.
And the "section_class" attribute allows you to specify a class name that will be used to create the the state-dependent classes for the ancestor element.
For instance, if "section" is "_html" and "section_class" is "my_panel", then the "toggle_my_panel_open", "toggle_my_panel_closed", "toggle_my_panel_opening", "toggle_my_panel_closing" will be added to the root HTML element.
Tip: Take a look at our demo page and open the "Fullsize Single - Right Panel" popup slideshow by clicking on the second image. It demonstrates the use of the "section_class" attribute. When the right floating panel is open, the content is narrower.
The theme also includes this slideshow ("Popup - Right Panel" profile).
|
close_on_slidechange | This attribute has been designed for toggles within slideshows. It specifies whether the toggle should be closed when a slide transition starts (true | false). Default is false. |
anim_duration | The duration of the expand/collapse animation, in milliseconds. Default: 450. |
anim_easing |
The easing of the expand/collapse animation.
Easing functions (timing functions) specify how the intermediate values are calculated during the animation.
Supported functions:
See Live Demo. |
anim_props |
Specifies the CSS properties of the toggle's wrapper to animate when the toggle should be open or closed.
You will find the same attribute for the toggle_title and toggle_content shortcodes. They allow you to animate all the wrapper element of the toggle, toggle title and content. By default, only the content wrapper is animated, but in some cases, animating the whole toggle or the toggle title can also be useful. For instance when the toggle is a floating panel and clicking on the open/close button (toggle title) moves the panel into and out of the view. In this case, the whole panel should be moved not only its content.
You can see this on our demo page. Open the "Fullsize Single - Right Panel" popup slideshow by clicking on the second image. Clicking on the right arrow at the top of the right panel, moves the panel from -310 to 0 (
anim_props="right:{from:-310,to:0} ).
The theme also includes this slideshow ("Popup - Right Panel" profile).
The following values are supported by the anim_props attribute:
The supported properties are:
Please note that if the value of the anim_props property is specified in a JavaScript object literal format, then the styles for the closed state must be set in CSS.
It is needed to avoid flickering on page load and it is also needed if the CSS styles are cleared at the end of the close animation (see the clear_anim_props attribute below).
For instance, if the anim_props is
or similarly:
Then use this custom class to specify the closed position with CSS:
Or similarly:
|
clear_anim_props |
Specifies whether the CSS styles used while opening/closing the toggle (anim_props attribute) must be cleared at the end of the open/close animation or not.
Possible values:
|
Attributes supported by the [toggle_title] shortcode. | |
---|---|
open_icon |
Specifies the icon to display when the toggle is open.
An empty string means no icon should be displayed.
If this attribute is not specified, the open_icon attribute of the container [toggle] shortcode determines the icon.
For a complete list of icons, see Font Icons. |
open_iconset |
Specifies the icon set that contains the icon referred by open_icon (see above).
If the value is an empty string, the theme automatically tries to find an icon set that contains the icon.
If this attribute is not specified, the open_iconset attribute of the container [toggle] shortcode determines the icon set.
For the supported icon sets, see Font Icons. |
closed_icon |
Specifies the icon to display when the toggle is closed.
An empty string means no icon should be displayed.
If this attribute is not specified, the closed_icon attribute of the container [toggle] shortcode determines the icon.
For a complete list of icons, see Font Icons. |
closed_iconset |
Specifies the icon set that contains the icon referred by closed_icon (see above).
If the value is an empty string, the theme automatically tries to find an icon set that contains the icon.
If this attribute is not specified, the closed_iconset attribute of the container [toggle] shortcode determines the icon set.
For the supported icon sets, see Font Icons. |
standard |
Specifies whether the standard CSS styles should be applied to the toggle title or not (true | false). Default is true.
This is a convenience feature. If you need a totally custom toggle title, in some cases, it makes styling easier if you turn the standard CSS styles off. |
anim_props |
Specifies the CSS properties of the toggle title's wrapper to animate when the toggle should be open or closed. Default is an empty string that means no need animation.
For details, please see the anim_props attribute of the toggle shortcode. |
clear_anim_props |
Specifies whether the CSS styles used while opening/closing the toggle (anim_props attribute) must be cleared at the end of the open/close animation or not.
Possible values:
|
Attributes supported by the [toggle_title_closed] shortcode. | |
---|---|
closed_icon |
Specifies the icon to display when the toggle is closed.
An empty string means no icon should be displayed.
If this attribute is not specified, the closed_icon attribute of the container [toggle] shortcode determines the icon.
For a complete list of icons, see Font Icons. |
closed_iconset |
Specifies the icon set that contains the icon referred by closed_icon (see above).
If the value is an empty string, the theme automatically tries to find an icon set that contains the icon.
If this attribute is not specified, the closed_iconset attribute of the container [toggle] shortcode determines the icon set.
For the supported icon sets, see Font Icons. |
standard |
Specifies whether the standard CSS styles should be applied to the toggle title or not (true | false). Default is true.
This is a convenience feature. If you need a totally custom toggle title, in some cases, it makes styling easier if you turn the standard CSS styles off. |
Attributes supported by the [toggle_title_open] shortcode. | |
---|---|
open_icon |
Specifies the icon to display when the toggle is open.
An empty string means no icon should be displayed.
If this attribute is not specified, the open_icon attribute of the container [toggle] shortcode determines the icon.
For a complete list of icons, see Font Icons. |
open_iconset |
Specifies the icon set that contains the icon referred by open_icon (see above).
If the value is an empty string, the theme automatically tries to find an icon set that contains the icon.
If this attribute is not specified, the open_iconset attribute of the container [toggle] shortcode determines the icon set.
For the supported icon sets, see Font Icons. |
standard |
Specifies whether the standard CSS styles should be applied to the toggle title or not (true | false). Default is true.
This is a convenience feature. If you need a totally custom toggle title, in some cases, it makes styling easier if you turn the standard CSS styles off. |
Attributes supported by the [toggle_content] shortcode. | |
---|---|
standard |
Specifies whether the standard CSS styles should be applied to the toggle content or not (true | false). Default is true.
This is a convenience feature. If you need a totally custom toggle content, in some cases, it makes styling easier if you turn the standard CSS styles off. |
anim_props |
Specifies the CSS properties of the toggle content's wrapper to animate when the toggle should be open or closed. Default is 'height' that means that when the toggle is closed, the height of the content will be zero, when it is open, the height will be as normal.
For details, please see the anim_props attribute of the toggle shortcode. |
clear_anim_props |
Specifies whether the CSS styles used while opening/closing the toggle (anim_props attribute) must be cleared at the end of the open/close animation or not.
Possible values:
By default, the height of the toggle content is animated (anim_props attribute) and the height is cleared at the end of the open animation. It means that the height will be "auto" () and not a pixel height. It is useful if the height of the toggle content can be changed. For instance, if there is an another toggle in it.
|