mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
parent
84b5075f5b
commit
d01cb61473
@ -12,12 +12,14 @@ function ThemeNav () {
|
|||||||
winPosition: 0,
|
winPosition: 0,
|
||||||
winHeight: null,
|
winHeight: null,
|
||||||
docHeight: null,
|
docHeight: null,
|
||||||
isRunning: null
|
isRunning: false
|
||||||
};
|
};
|
||||||
|
|
||||||
nav.enable = function () {
|
nav.enable = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
if (!self.isRunning) {
|
||||||
|
self.isRunning = true;
|
||||||
jQuery(function ($) {
|
jQuery(function ($) {
|
||||||
self.init($);
|
self.init($);
|
||||||
|
|
||||||
@ -40,6 +42,7 @@ function ThemeNav () {
|
|||||||
self.onResize();
|
self.onResize();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nav.init = function ($) {
|
nav.init = function ($) {
|
||||||
var doc = $(document),
|
var doc = $(document),
|
||||||
|
@ -13,12 +13,14 @@ function ThemeNav () {
|
|||||||
winPosition: 0,
|
winPosition: 0,
|
||||||
winHeight: null,
|
winHeight: null,
|
||||||
docHeight: null,
|
docHeight: null,
|
||||||
isRunning: null
|
isRunning: false
|
||||||
};
|
};
|
||||||
|
|
||||||
nav.enable = function () {
|
nav.enable = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
if (!self.isRunning) {
|
||||||
|
self.isRunning = true;
|
||||||
jQuery(function ($) {
|
jQuery(function ($) {
|
||||||
self.init($);
|
self.init($);
|
||||||
|
|
||||||
@ -41,6 +43,7 @@ function ThemeNav () {
|
|||||||
self.onResize();
|
self.onResize();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nav.init = function ($) {
|
nav.init = function ($) {
|
||||||
var doc = $(document),
|
var doc = $(document),
|
||||||
|
Loading…
Reference in New Issue
Block a user