[78ef36]: / docs-source / pytorch_sphinx_theme / js / mobile-toc.js

Download this file

20 lines (17 with data), 497 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
window.mobileTOC = {
bind: function() {
$("[data-behavior='toggle-table-of-contents']").on("click", function(e) {
e.preventDefault();
var $parent = $(this).parent();
if ($parent.hasClass("is-open")) {
$parent.removeClass("is-open");
$(".pytorch-left-menu").slideUp(200, function() {
$(this).css({display: ""});
});
} else {
$parent.addClass("is-open");
$(".pytorch-left-menu").slideDown(200);
}
});
}
}