Object options vs. 1.2.2 Full+Lite

An optional object to hold the Accordion properties. The ng.Accordion class inherits the ng.PlugIn.options and all it's properties.

Properties

String css_prefix (Optional - Default: ng_accordion_) vs. 1.2.2 Full+Lite
A CSS class prefix to add to all the HTML Elements.
Mixed max_height (Optional - Default: auto) vs. 1.2.2 Full+Lite
The maximum height option of the accordion panels. This value can be one of the following:
  • auto: the default value which sets the panel to the content height.
  • max: Set the panels height to the height of the tallest panel.
  • fill: Set the height of the panels to fit the parent element.
  • Number: If a number is based, the maximum height will be set to this value.
String position (Optional - Default: after) vs. 1.2.2 Full+Lite
The position of the content panel in relation to the button. This can be one of the following:
  • after: the default value which places the content under the button.
  • before: places the content above the button.
  • bottom: place the content panels below all the button.
  • top: place the content panes above all the buttons.
Integer active_tab (Optional - Default: 0) vs. 1.2.2 Full+Lite
The initial open tab number (0 based). To keep all the tabs close, use -1.
Boolean keep_open Required vs. 1.2.2 Full+Lite
Force at lease one content tap to stay open all the time.
Boolean multi_open (Optional - Default: false) vs. 1.2.2 Full+Lite
Allow the user to keep more than one tab open in the same time.
Boolean can_sort (Optional - Default: false) vs. 1.2.2 Full+Lite
Can the user sort and re-organize the tabs.
Boolean close_on_sort (Optional - Default: true) vs. 1.2.2 Full+Lite
Should the open tabs close when the user start sorting them and re-open when done.
Object sortable_options (Optional - Default: null) vs. 1.2.2 Full+Lite
Additional option for the sortable object. Refer to ng.Sortable.options for details.
Boolean can_remove (Optional - Default: false) vs. 1.2.2 Full+Lite
Can the user remove tabs or not.
Object content_type (Optional - Default: null) vs. 1.2.2 Full+Lite
An object to define new content types or change the default behavior.
Object content_preopen (Optional - Default: null) vs. 1.2.2 Full+Lite
An object of custom content types functions to call before the tabs are opened. This can be used to prepare the tab or fetch data.
Object content_preclose (Optional - Default: null) vs. 1.2.2 Full+Lite
An object of custom content types functions to call before the tabs are closed. This can be used pause animation/video or clear data.
Object content_resize (Optional - Default: null) vs. 1.2.2 Full+Lite
An object of custom content types functions to call when the tab is resized. This can be used to resize iframes or images.

String ajax_process (String text, String status) vs. 1.2.2 Full+Lite

A function to process Ajax return content before adding it to the tab. This function will receive two variables, the text and the status (success or fail). If the Ajax request fails, the text will be the status code (e.g. 404).

Parameters

String text Required vs. 1.2.2 Full+Lite
The text returned from the Ajax request on success or the error code (e.g. 404).
String status Required vs. 1.2.2 Full+Lite
The Ajax status of either success or fail.

Return

String Required vs. 1.2.2 Full+Lite
The returned text to populate the tab content.
String ajax_failed (Optional - Default: null) vs. 1.2.2 Full+Lite
A string to use if the Ajax request fails. If not defined, the status text and code will be used for example Not Found (404)
Boolean false (Optional - Default: disabled) vs. 1.2.2 Full+Lite
To disable the accordion or not.

Inherit Options from ng.PlugIn (options)

HTML_Element object (Optional - Default: Null) vs. 1.1.0 Full+Lite
The HTML Element that will hold all the plugin output and handle all the events. By default, an new DIV will be created at the bottom of the body.
String language (Optional - Default: en (Configuration value)) vs. 1.1.0 Full+Lite
The default plugin language.