PageSourceSearch

https://www.polus.edu.cn/wp-content/themes/polus_2019/js/common.js?date=20240116

js polus.edu.cn collected 2026-10-08 16:01:19 UTC 2,913 bytes, 96 lines download raw bytes

1$(function(){
2    var menuOn = false;
3	$('.burger-menu').click(function(){
4        $('html').toggleClass('is-menu-open');
5	});
6	
7	$('header li').hover(function() {
8	  $(this).find('ul').stop(true, true).fadeIn(250);
9	}, function() {
10	  $(this).find('ul').stop(true, true).fadeOut(150);
11	});
12    
13    $('header').affix({
14        offset: {
15            top:60
16        }
17    })
18
19    menuHandler();
20    widgetHandler();
21    searchBarHandler();
22})
23
24var searchBarHandler = function(){
25    $('.sb-icon-search').click(function(){
26        $('.sb-search').toggleClass('bar-open');
27    });
28    $('.sb-search-input').blur(function(){
29        $('.sb-search').removeClass('bar-open');
30    })
31}
32
33var menuHandler = function() {
34    let trigger = $('.menu-ul .menu-disabled');  
35    trigger.click(function(){
36        if(!$(this).hasClass('active')){
37            let menu = $(this).siblings('.sub-menu');
38            trigger.siblings('.sub-menu').slideUp('normal');
39            menu.stop(true,true).slideDown('normal');
40            trigger.removeClass('active');
41            $(this).addClass('active');
42        }else{
43            $(this).siblings('.sub-menu').slideUp('normal');
44            trigger.removeClass('active');
45        }
46        
47    })
48}
49
50var widgetHandler = function(){
51    $('.widget-btn').click(function(){
52       $('.widget-wrapper').toggleClass('is-clicked');
53    });
54    $('.widget-close').click(function(){
55        $('.widget-wrapper').removeClass('is-clicked');
56    });
57    var gotop = $('.w_top');
58    gotop.hide();
59    gotop.click(function(){
60        window.scrollTo(0, 0);
61    });
62    $(window).scroll(function(){
63        var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
64//        console.log(scrollTop);
65        if(scrollTop>500){
66            gotop.css('display','inline-block');
67            $('.w_contact').addClass('on');
68        }else{
69            gotop.hide();
70            $('.w_contact').removeClass('on');
71        }
72    });
73    $('.w_contact').click(function(e){
74        if(judge.isMobile()){
75            window.open('https://work.weixin.qq.com/ca/cawcdeb454da3cb18c');
76        }else{
77            $('.widgets_img.poll').removeClass('clicked');
78            $('.w_poll').text('参加调查');
79            $('.widgets_img.contact').toggleClass('clicked');
80            var text = $(this).text();
81            $(this).text(
82                text == "欢迎联系" ? "关闭弹窗" : "欢迎联系"
83            ); 
84        }
85        
86    });
87    $('.w_poll').click(function(){
88        $('.widgets_img.contact').removeClass('clicked');
89        $('.w_contact').text('欢迎联系');
90        $('.widgets_img.poll').toggleClass('clicked');
91        var text = $(this).text();
92        $(this).text(
93            text == "参加调查" ? "关闭弹窗" : "参加调查"
94        ); 
95    });
96}

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.