Difference between revisions of "MediaWiki:Common.js"

A fragment of the Garden of Remembering

(?)
 
(...?)
Line 2: Line 2:


$(function() { mw.loader.load('jquery.ui.button'); });
$(function() { mw.loader.load('jquery.ui.button'); });
/* Collapsibility from uncyc */
$j( function() {
$j( '.collapsed > *' ).next().hide();
$j( '.expanded > *, .collapsed > *' ).click( function() {
var $t = $j( this );
$t.next().toggle();
$t.parent().toggleClass( 'expanded collapsed' );
} );
} );

Revision as of 14:51, 6 October 2015

/* Any JavaScript here will be loaded for all users on every page load. */

$(function() { mw.loader.load('jquery.ui.button'); });

/* Collapsibility from uncyc */
$j( function() {
	$j( '.collapsed > *' ).next().hide();
	$j( '.expanded > *, .collapsed > *' ).click( function() {
		var $t = $j( this );
		$t.next().toggle();
		$t.parent().toggleClass( 'expanded collapsed' );
	} );
} );