summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js
index bc996b710..081d77bdf 100644
--- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js
+++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js
@@ -25,7 +25,7 @@ $(document).ready(function () {
$('#closeMe').toggle(
function ()
{
- setCookie('ciNav', 'true', 365);
+ setCookie('ciNav', 'yes', 365);
$('#nav2').show();
$('#topMenu').remove();
$('body').css({background: 'none'});
@@ -35,7 +35,7 @@ $(document).ready(function () {
},
function ()
{
- setCookie('ciNav', 'false', 365);
+ setCookie('ciNav', 'no', 365);
$('#topMenu').remove();
$('#nav').hide();
$('#nav2').hide();
@@ -44,7 +44,7 @@ $(document).ready(function () {
$('.wy-nav-side').show();
}
);
- if (getCookie('ciNav') == 'true')
+ if (getCookie('ciNav') == 'yes')
{
$('#closeMe').trigger('click');
//$('#nav').slideToggle();
@@ -56,7 +56,7 @@ $(document).ready(function () {
// Rufnex Cookie functions
function setCookie(cname, cvalue, exdays) {
// expire the old cookie if existed to avoid multiple cookies with the same name
- if (getCookie(cname) != false) {
+ if (getCookie(cname)) {
document.cookie = cname + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
}
var d = new Date();
@@ -75,27 +75,27 @@ function getCookie(cname) {
return c.substring(name.length, c.length);
}
}
- return false;
+ return '';
}
// End
// resize window
$(window).on('resize', function(){
// show side nav on small screens when pulldown is enabled
- if (getCookie('ciNav') == 'true' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme
+ if (getCookie('ciNav') == 'yes' && $(window).width() <= 768) { // 768px is the tablet size defined by the theme
$('.wy-nav-side').show();
}
// changing css with jquery seems to override the default css media query
// change margin
- else if (getCookie('ciNav') == 'false' && $(window).width() <= 768) {
+ else if (getCookie('ciNav') == 'no' && $(window).width() <= 768) {
$('.wy-nav-content-wrap').css({'margin-left': 0});
}
// hide side nav on large screens when pulldown is enabled
- else if (getCookie('ciNav') == 'true' && $(window).width() > 768) {
+ else if (getCookie('ciNav') == 'yes' && $(window).width() > 768) {
$('.wy-nav-side').hide();
}
// change margin
- else if (getCookie('ciNav') == 'false' && $(window).width() > 768) {
+ else if (getCookie('ciNav') == 'no' && $(window).width() > 768) {
$('.wy-nav-content-wrap').css({'margin-left': '300px'});
}
});