PageSourceSearch

https://www.onbacon.com/skin/sites/common/js/guowei.js

js onbacon.com collected 2026-10-05 05:52:17 UTC 2,924 bytes, 86 lines download raw bytes

1/**/
2var deviceType = /iPad/.test(navigator.userAgent) ? 't' : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? 'm' : 'p',ucBro=/UC/.test(navigator.userAgent);
3/*
4 * deviceType       //设备判断(p:PC,t:平板,m:手机)
5 */
6$(document).ready(function() {
7	Breakpoints();
8    /*导航处理*/
9    if (deviceType != 'p') {
10        $('.main-nav .nav>li>.dropdown-menu .visible-xs').removeClass('visible-xs');
11    }
12    $('.main-nav .dropdown a.link').click(function() {
13        if (deviceType == 'p' && !Breakpoints.is('xs') && $(this).data("hover")) window.location.href = $(this).attr('href');
14    });
15    /*下拉菜单动画修复*/
16    $(".navlist .dropdown-submenu").hover(
17        function() {
18            $(this).parent('.dropdown-menu').addClass('overflow-visible');
19        },
20        function() {
21            $(this).parent('.dropdown-menu').removeClass('overflow-visible');
22        }
23    );
24	var nav_li=$(".navlist .dropdown");
25	(function($){
26		$.fn.hoverDelay = function(options){
27		    var defaults = {
28		        // 鼠标经过的延时时间
29		        hoverDuring: 200,
30		        // 鼠标移出的延时时间
31		        outDuring: 0,
32		        // 鼠标经过执行的方法
33		        hoverEvent: function(){
34		            // 设置为空函数,绑定的时候由使用者定义
35		         	$.noop();
36		        },
37		        // 鼠标移出执行的方法
38		        outEvent: function(){
39		            $.noop();    
40		    	}
41		    };
42		    var sets = $.extend(defaults,options || {});
43		    var hoverTimer, outTimer;
44		    return $(this).each(function(){
45		    // 保存当前上下文的this对象
46		    var $this = $(this)
47		    $this.hover(function(){
48		        clearTimeout(outTimer);
49		        hoverTimer = setTimeout(function () {
50		            // 调用替换
51		            sets.hoverEvent.apply($this);
52		        }, sets.hoverDuring);
53		        }, function(){
54		            clearTimeout(hoverTimer);
55		            outTimer = setTimeout(function () {
56		                sets.outEvent.apply($this);
57		            }, sets.outDuring);
58		        });
59		    });
60		}
61	})(jQuery);
62	// 具体使用,给id为“#test”的元素添加hoverEvent事件
63	nav_li.hoverDelay({
64	// 自定义,outEvent同
65		hoverEvent: function(){
66		    $(this).addClass('open');
67		},
68		outEvent: function(){
69		    $(this).removeClass('open');
70		}
71	});
72	
73	// Elements Animation
74	if($('.wow').length){
75		var wow = new WOW(
76			{
77				boxClass:     'wow',      // animated element css class (default is wow)
78				animateClass: 'animated', // animation css class (default is animated)
79				offset:       0,          // distance to the element when triggering the animation (default is 0)
80				mobile:       true,       // trigger animations on mobile devices (default is true)
81				live:         true       // act on asynchronously loaded content (default is true)
82			}
83		);
84		wow.init();
85	}
86});

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.