Collapse a collection of elements.
- Source:
Methods
$.fn.makeCollapsible([options]) → {jQuery}static
#
Enable collapsible-functionality on all elements in the collection.
- Will prevent binding twice to the same element.
- Initial state is expanded by default, this can be overridden by adding class "mw-collapsed" to the "mw-collapsible" element.
- Elements made collapsible have jQuery data "mw-made-collapsible" set to true.
- The inner content is wrapped in a "
div.mw
-collapsible-content" (except for tables and lists).
To use this jQuery
plugin, load the jquery.makeCollapsible
module with mw.loader
.
Example
mw.loader.using( 'jquery.makeCollapsible' ).then( () => {
$( 'table' ).makeCollapsible();
} );
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional |
Properties:
|
- Source:
Returns:
- Type
- jQuery