MediaWiki:Common.js/lightswitch.js: Difference between revisions
From The Official Visionaire Studio: Adventure Game Engine Wiki
No edit summary |
No edit summary |
||
| (44 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
$(function() { | /* Toggle theme - written by AFRLme [Lee Clarke] */ | ||
$(document).ready(function() { | |||
$("#switchLight").click(function() { | |||
$("#switchLight").hide(); | |||
$("#switchDark").show(); | |||
$(".switchTheme").attr("href",$(this).attr('rel')); | |||
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'}); | |||
return false; | |||
}); | |||
$("#switchDark").click(function() { | |||
$("#switchDark").hide(); | |||
$("#switchLight").show(); | |||
$(".switchTheme").attr("href",$(this).attr('rel')); | |||
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'}); | |||
return false; | |||
}); | |||
}); | }); | ||
Latest revision as of 22:19, 9 May 2016
/* Toggle theme - written by AFRLme [Lee Clarke] */
$(document).ready(function() {
$("#switchLight").click(function() {
$("#switchLight").hide();
$("#switchDark").show();
$(".switchTheme").attr("href",$(this).attr('rel'));
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'});
return false;
});
$("#switchDark").click(function() {
$("#switchDark").hide();
$("#switchLight").show();
$(".switchTheme").attr("href",$(this).attr('rel'));
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'});
return false;
});
});