* Append a new style block to the head
*
* @param text String CSS to be appended
- * @return the CSS stylesheet
+ * @return CSSStyleSheet object
*/
'addCSS' : function( text ) {
var s = document.createElement( 'style' );
/**
* Hide/show the table of contents element
*
- * @param text String CSS to be appended
- * @return the CSS stylesheet
+ * @param $toggleLink jQuery object of the toggle link
+ * @return String boolean visibility of the toc (true means it's visible)
*/
'toggleToc' : function( $toggleLink ) {
var $tocList = $( '#toc ul:first' ),
expires: 30,
path: '/'
} );
+ return true;
} else {
$tocList.slideUp( 'fast' );
$toggleLink.text( mw.msg( 'showtoc' ) );
expires: 30,
path: '/'
} );
+ return false;
}
},