PageSourceSearch

https://flowcontrol-valve.com/js/comm.js

js flowcontrol-valve.com collected 2026-10-04 04:57:45 UTC 8,141 bytes, 275 lines download raw bytes

1(function($,window,undefined){
2	var $allDropdowns = $();
3	$.fn.dropdownHover = function(options) {
4		$allDropdowns = $allDropdowns.add(this.parent());   
5		return this.each(function() {
6			var $this = $(this).parent(),   
7				defaults = {
8					delay: 50, 
9					instantlyCloseOthers: true 
10				}, 
11				data = {delay: $(this).data('delay'), instantlyCloseOthers: $(this).data('close-others')},  
12				options = $.extend(true, {}, defaults, options, data),
13				timeout;    
14			$this.hover(function() {    
15				if(options.instantlyCloseOthers === true){
16					$allDropdowns.removeClass('show'); 
17					window.clearTimeout(timeout); 
18					$(this).addClass('show');
19					$this.find(".dropdown-menu").addClass("show");
20				}
21			}, function() { 
22				console.log(options.delay);
23				timeout = window.setTimeout(function() {    
24					$this.removeClass('show');  
25					$this.find(".dropdown-menu").removeClass("show");
26				}, options.delay);  
27			}); 
28		}); 
29	};  
30})(jQuery, this);
31if($(window).width()>992)
32{
33    $('.dropdown-toggle').dropdownHover(); 
34}
35$('a.dropdown-toggle').click(function(e){		
36	if($(window).width()>992)
37	{
38		e.preventDefault();
39	    location.href= $(this).attr("href");
40	}
41	else{
42		e.preventDefault();
43		var classname = e.target["className"];
44		if(classname == "pro_icon")
45		{
46			var parent_id = $(this).parent();
47			var parentclass = parent_id.attr("class");
48			if(parentclass.indexOf("show") >= 0 ) { 
49                parent_id.removeClass("show");
50			    parent_id.find("ul.dropdown-menu").removeClass("show");
51				parent_id.find("span.pro_icon").html("+");
52            } 
53			else{
54				parent_id.addClass("show");
55			    parent_id.find("ul.dropdown-menu").addClass("show");
56				parent_id.find("span.pro_icon").html("-");
57			}
58		}
59		else{
60			location.href= $(this).attr("href");
61		}
62	}
63	return false;
64});
65
66
67
68jQuery(function($) {
69	$('a.dropdown-toggle').click(function(e){
70		e.preventDefault();
71		var th=$(this); 
72		if($(window).width()>767)
73		{
74			location.href= th.attr("href");
75		}
76	});
77	
78	if(jQuery(".js-gallery-wrap").length > 0){
79        jQuery(".js-gallery-wrap").magnificPopup({
80            delegate:"figure  a",
81            type:"image",
82            gallery:{
83                enabled:true,
84                navigateByImgClick:true,
85                preload:[ 0, 1 ]
86            }
87        });
88    }
89    
90    $("body").on("mousemove", ".related_pic img", function() {
91        var th = $(this);
92		$(".related_pic a").removeClass("imgdq");
93		th.parent().addClass("imgdq");
94        var src = th.attr("src");
95		src = src.replace("b.jpg", ".jpg");
96		src = src.replace("s.jpg", ".jpg");
97        var href = th.attr("href");
98		var thiss =  $(this).parent().parent().parent().parent().parent().parent();
99        var imgpro = thiss.find(".left_pics img");
100        imgpro.attr("src", src);
101        src = src.replace("b.jpg", ".jpg");
102        thiss.find(".left_pics a").attr("href", src);
103    });
104	$("body").on("click", ".etw_language>ul>li>span", function() {             
105        if ($(window).width() <=992) {
106   			$(".etw_language>ul>li>ul").toggle();
107  		}
108     	return false;
109    });
110 	$(window).resize(function() {
111     	if ($(window).width() >992) {
112    		$("body").find(".etw_language>ul>li>ul").removeAttr("style","");
113   		}
114    });
115    if ($(".owl-carousel1").length > 0) {
116        $(".owl-carousel1").owlCarousel({
117             loop:true,
118             margin:20,
119             autoplay:true,
120             autoplayTimeout:6000,
121             responsive:{
122                 0:{
123                     items:1
124                 },
125                 480:{
126                     items:2
127                 },
128                 600:{
129                     items:3
130                 },
131                 1000:{
132                     items:4
133                 }
134             }
135           });
136     }
137   
138    if ($(".owl-carousel").length > 0) {
139        $(".owl-carousel").owlCarousel({
140             loop:true,
141             margin:20,
142             autoplay:false,
143             autoplayTimeout:6000,
144             responsive:{
145                 0:{
146                     items:1
147                 },
148                 480:{
149                     items:2
150                 },
151                 600:{
152                     items:3
153                 },
154                 1000:{
155                     items:3
156                 }
157             }
158           });
159     }
160     
161    
162
163});
164
165var navEl = $("#header");
166    $(window).scroll(function (event) {
167        var scrollTop = $(window).scrollTop();
168        var bodyScrollHeight = document.body.scrollHeight;
169        if (scrollTop >= 100) {
170            // && bodyScrollHeight >= 500
171            navEl.addClass("nav-fixed");
172        } else {
173            navEl.removeClass("nav-fixed");
174        }
175    }).trigger("scroll");;
176function init() {
177    if ($(window).width() > 767) {
178        if ($("#etw_top").length == 0) {
179            $("body").append('<div id="etw_top"><a class="icon-chevron-up"></a></div>');
180        }
181        $(document).scroll(function () {
182            var scrollTop = $(document).scrollTop();
183            if (scrollTop > 100) {
184                $("#etw_top").show();
185            }
186            else {
187                $("#etw_top").hide();
188            }
189        });
190    }
191}
192init();
193$("body").on("click", "#etw_top", function () {
194    $('html,body').animate({ scrollTop: '0px' }, 800);
195});
196
197$("body").on("click", ".tab_li li", function() {
198    var index = $(this).index();
199    $(".tab_li li").removeClass("dq");
200    $(".tab_li li").eq(index).addClass("dq");
201    var h = 190;
202    if (index > 0 && $(".tabfixed").length == 1) {
203        h = 170;
204    }
205    var height = $(".pro_model").eq(index).offset().top - h;
206    $("html,body").animate({scrollTop:height}, 500);
207});
208
209settab();
210
211$(document).scroll(function() {
212    if ($(window).width() > 991) {
213        settab();
214    }
215});
216
217function settab() {
218    if ($(".tab_li").length > 0) {
219        var scrollTop = $(window).scrollTop();
220        var index = 0;
221        var plength = $(".pro_model").length;
222        for (var i = 0; i < plength; i++) {
223            var n = i + 1;
224            if ($(".pro_model").eq(n).length > 0) {
225                var height1 = $(".pro_model").eq(i).offset().top - 180;
226                var height2 = $(".pro_model").eq(n).offset().top - 180;
227                if (scrollTop >= height1 && scrollTop < height2) {
228                    index = i;
229                    break;
230                }
231            } else {
232                var height1 = $(".pro_model").eq(i).offset().top - 180;
233                if (scrollTop >= height1) {
234                    index = i;
235                    break;
236                }
237            }
238        }
239        var height = $(".pro_model").eq(0).offset().top - 180;
240        if (scrollTop > height) {
241            $(".tab_li").addClass("tabfixed");
242        } else {
243            $(".tab_li").removeClass("tabfixed");
244        }
245        $(".tab_li li").removeClass("dq");
246        $(".tab_li li").eq(index).addClass("dq");
247    }
248}
249jQuery.get("menu-items.txt",function(data){
250    var links=$(data);
251    var dqlink=window.location.href;
252    dqdocu = dqlink.replace("http://", "").replace("https://", "").replace(window.location.host, "").replace("/", "");
253    dqdocu = dqdocu.replace("web/35/enjingyi/", "");
254    if(dqdocu!=""){
255        var dqls=links.find("a[href='"+dqdocu+"']");
256		dqls.addClass("active");
257		/*class*/
258		if($("#quicknav ul li").length >2){
259			 var hrefs = jQuery("#quicknav li").eq(2).find("a").attr("href"); 
260		     if(hrefs != undefined){
261				var dqlss=links.find("a[href='"+hrefs+"']");
262				dqlss.addClass("active");
263			 }
264			 if($("#quicknav ul li").length >3){
265				 var hrefss = jQuery("#quicknav li").eq(3).find("a").attr("href"); 
266		         if(hrefs != undefined){
267				    var dqlsss=links.find("a[href='"+hrefss+"']");
268				    dqlsss.addClass("active");
269			      }
270			 }
271		}
272    }
273    links.appendTo($("#menu-items"));
274})
275

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.