As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com.

Difference between revisions of "MediaWiki:Common.js"

From ChipWhisperer Wiki
Jump to: navigation, search
Line 12: Line 12:
  
 
$(function() {
 
$(function() {
     $('.playground').append('<span class="toggle-states"><a onclick="$(\'.mw-collapsible-content\').toggleClass(\'force-expand\');/*$(\'.mw-collapsible-bracket\').trigger(\'click\');*/">Show/Hide All</a></span>');
+
     $('.playground').append('<span class="toggle-states"><a onclick="if ($(\'.mw-collapsible-content\').hasClass(\'force-expand\'))    {        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');        $(\'.mw-collapsible-content\').addClass(\'force-collapse\');    }    else    {        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');    };/*$(\'.mw-collapsible-bracket\').trigger(\'click\');*/">Show/Hide All</a></span>');});
});
+
 
 +
/*
 +
if ($(\'.mw-collapsible-content\').hasClass(\'force-expand\'))
 +
    {
 +
        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');
 +
        $(\'.mw-collapsible-content\').addClass(\'force-collapse\');
 +
    }
 +
    else
 +
    {
 +
        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');
 +
    }
 +
*/

Revision as of 14:14, 20 January 2017

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

//Global Show/Hide
//Author: Princess Platinum
/* 
$(function() {
    $('#collapse-global').html('<a class="wikia-button" onclick="for (var i=0; i < 100; i++) { collapseTable([i]); }">Show/Hide All</a>');
});
*/

/* To make button appear put this here <div id="collapse-global">Loading...</div> */

$(function() {
    $('.playground').append('<span class="toggle-states"><a onclick="if ($(\'.mw-collapsible-content\').hasClass(\'force-expand\'))    {        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');        $(\'.mw-collapsible-content\').addClass(\'force-collapse\');    }    else    {        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');    };/*$(\'.mw-collapsible-bracket\').trigger(\'click\');*/">Show/Hide All</a></span>');});

/*
if ($(\'.mw-collapsible-content\').hasClass(\'force-expand\'))
    {
        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');
        $(\'.mw-collapsible-content\').addClass(\'force-collapse\');
    }
    else
    {
        $(\'.mw-collapsible-content\').removeClass(\'force-expand\');
    }
*/