Commit 24f7965045df8d6eca7f94090c384c8f84406f3f
1 parent
62f05f5d
Exists in
homepage
and in
1 other branch
Re-include high contrast js
Showing
1 changed file
with
14 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +jQuery( document ).ready(function( $ ) { | ||
2 | + // Run code | ||
3 | + if($.cookie("high_contrast") === 'true'){ | ||
4 | + $( "body" ).toggleClass( "contraste" ); | ||
5 | + } | ||
6 | + $( "#siteaction-contraste a" ).click(function() { | ||
7 | + $( "body" ).toggleClass( "contraste" ); | ||
8 | + if($('body').hasClass('contraste')){ | ||
9 | + $.cookie('high_contrast', 'true', {path: '/'}); | ||
10 | + } else { | ||
11 | + $.cookie('high_contrast', null, { path: '/' }); | ||
12 | + } | ||
13 | + }); | ||
14 | +}); |