Difference between revisions of "MediaWiki:Common.js"

From Awesome Baozam
Jump to: navigation, search
(Created page with "( function ( mw, $ ) { 'use strict'; // Table of contents toggle mw.hook( 'wikipage.content' ).add( function ( $content ) { alert(); } ); }( mediaWik...")
 
Line 4: Line 4:
 
     // Table of contents toggle
 
     // Table of contents toggle
 
     mw.hook( 'wikipage.content' ).add( function ( $content ) {
 
     mw.hook( 'wikipage.content' ).add( function ( $content ) {
         alert();
+
         $content.find('.details' ).each( function() {
 +
                $(this).slideUp( 'fast' );
 +
        } );
 
     } );
 
     } );
  
 
}( mediaWiki, jQuery ) );
 
}( mediaWiki, jQuery ) );

Revision as of 12:16, 6 July 2016

( function ( mw, $ ) {
    'use strict';
 
    // Table of contents toggle
    mw.hook( 'wikipage.content' ).add( function ( $content ) {
        $content.find('.details' ).each( function() {
                $(this).slideUp( 'fast' );
        } );
    } );
 
}( mediaWiki, jQuery ) );