$toggle = $firstItem.find( '> .mw-collapsible-toggle' );
// If theres no toggle link, add it to the last cell
$toggle = $firstItem.find( '> .mw-collapsible-toggle' );
// If theres no toggle link, add it to the last cell
$collapsible.before( $toggle );
} else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) {
// The toggle-link will be in the first list-item
$collapsible.before( $toggle );
} else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) {
// The toggle-link will be in the first list-item
$toggle = $firstItem.find( '> .mw-collapsible-toggle' );
// If theres no toggle link, add it
$toggle = $firstItem.find( '> .mw-collapsible-toggle' );
// If theres no toggle link, add it
if ( options.collapsed || $collapsible.hasClass( 'mw-collapsed' ) ) {
// One toggler can hook to multiple elements, and one element can have
// multiple togglers. This is the sanest way to handle that.
if ( options.collapsed || $collapsible.hasClass( 'mw-collapsed' ) ) {
// One toggler can hook to multiple elements, and one element can have
// multiple togglers. This is the sanest way to handle that.