MediaWiki:Common.js/lightswitch.js: Difference between revisions
From The Official Visionaire Studio: Adventure Game Engine Wiki
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
$("#switchLight").click(function() { | $("#switchLight").click(function() { | ||
$("#switchLight").hide(); | |||
$("#switchDark").show(); | |||
$("link").attr("href",$(this).attr('rel')); | |||
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'}); | |||
return false; | |||
}); | |||
$("#switchDark").click(function() { | $("#switchDark").click(function() { | ||
$("#switchDark").hide(); | $("#switchDark").hide(); | ||
$("#switchLight").show(); | $("#switchLight").show(); | ||
$("link").attr("href",$(this).attr('rel')); | |||
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'}); | |||
return false; | |||
}); | |||
}); | }); | ||
Revision as of 23:13, 5 November 2014
$(document).ready(function() {
$("#switchLight").click(function() {
$("#switchLight").hide();
$("#switchDark").show();
$("link").attr("href",$(this).attr('rel'));
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'});
return false;
});
$("#switchDark").click(function() {
$("#switchDark").hide();
$("#switchLight").show();
$("link").attr("href",$(this).attr('rel'));
$.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'});
return false;
});
});