PageSourceSearch

https://pytorch-cn.com/assets/mobile-menu.js

js pytorch-cn.com collected 2026-10-06 13:55:09 UTC 736 bytes, 30 lines download raw bytes

1var mobileMenu = {
2  bind: function() {
3    $("[data-behavior='open-mobile-menu']").on('click', function(e) {
4      e.preventDefault();
5      $(".mobile-main-menu").addClass("open");
6      $("body").addClass('no-scroll');
7
8      mobileMenu.listenForResize();
9    });
10
11    $("[data-behavior='close-mobile-menu']").on('click', function(e) {
12      e.preventDefault();
13      mobileMenu.close();
14    });
15  },
16
17  listenForResize: function() {
18    $(window).on('resize.ForMobileMenu', function() {
19      if ($(this).width() > 768) {
20        mobileMenu.close();
21      }
22    });
23  },
24
25  close: function() {
26    $(".mobile-main-menu").removeClass("open");
27    $("body").removeClass('no-scroll');
28    $(window).off('resize.ForMobileMenu');
29  }
30};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.