Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Morbus Iff (talk | contribs) |
Morbus Iff (talk | contribs) (Replaced content with "→Any JavaScript here will be loaded for all users on every page load.: /** Inline spoilers ************************************************************ * * Descrip...") |
||
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
− | /* | + | /** Inline spoilers ************************************************************ |
* | * | ||
− | * Description: | + | * Description: Allows inline spans to be toggled on or off. |
− | * Maintainers: [[User: | + | * Maintainers: [[User:Morbus Iff]] |
*/ | */ | ||
− | + | $j(document).ready( function() { | |
− | + | $j(".spoiler-click").click(function () { | |
− | + | $j(this).next('.spoiler-data').toggle(); | |
− | + | }); | |
− | + | }); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | function | ||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | function | ||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | } | ||
− | |||
− |
Revision as of 17:36, 26 June 2014
/* Any JavaScript here will be loaded for all users on every page load. */
/** Inline spoilers ************************************************************
*
* Description: Allows inline spans to be toggled on or off.
* Maintainers: [[User:Morbus Iff]]
*/
$j(document).ready( function() {
$j(".spoiler-click").click(function () {
$j(this).next('.spoiler-data').toggle();
});
});