PageSourceSearch

http://ltech-led.com/templets/ltech-new/js/headjs_en.js

js ltech-led.com collected 2026-10-08 23:51:00 UTC 11,887 bytes, 359 lines download raw bytes

1$(".dropdown_click").click(function () {
2    var html = $(this).find(".dropdown-menu").html();
3
4    $(this).addClass("select-tr").siblings('li').removeClass('select-tr');
5    $(".menu_other").html('<ul class="show">' + html + "</ul>");
6    $(".menu_other").css('display', 'block');
7
8});
9$(".show_log").click(function () {
10    $(".menu_other").css('display', 'none');
11    $(".menu .menu_first").removeClass("menu_first_click");
12    $(".show_log").css("display", "none");
13});
14
15$("body").on('click', '.level-title', function () {
16    $_this = $(this).parent("li");
17    var dropdown = $_this.parent("ul");
18    if ($_this.find("ul").css('display') === "none") {
19        //收起其他菜单栏
20        var level = dropdown.find('.level2-menu');
21        level.slideUp("slow");
22        //显示点击栏目
23        $_this.find('ul').slideDown('slow');
24        $_this.siblings('li').removeClass("select-tow");
25        $_this.addClass("select-tow");
26        return false;
27    }
28});
29
30jQuery(document).ready(function () {
31    //添加默认显示
32    var _this = $(".menu");
33    var links = _this.find("a");
34
35    if (_this.find(".active_index").html() === undefined) {
36        for (var i = 0; i < links.length; i++) {
37            if (links[i].href == document.location.href) {
38                links[i].className = "current_app";
39                break;
40            } else {
41                if ((links[i].href == "http://www.ltech.cn/" && ("http://www.ltech.cn/" == document.location.href || "http://www.ltech.cn/html/cn/" == document.location.href || "http://www.ltech.cn/html/cn/index.html" == document.location.href)) || (links[i].href == "http://www.ltech.cn/html/en/" && ("http://www.ltech.cn/html/en/index.html" == document.location.href || "http://www.ltech.cn/html/en/" == document.location.href))) {
42                    links[i].className = "current_app";
43                } else {
44                    var href_str = "http://www.ltech.cn" + $(".local").children("a:last-child").attr("href");
45                    if (href_str == links[i].href) {
46                        links[i].className = "current_app";
47                    }
48                }
49            }
50        }
51    } else {
52        _this.find(".active_index a").addClass("current_app");
53    }
54});
55
56$("body").on('click', ".current_app", function () {
57    $_this = $(this).parent("li");
58    var dropdown = $_this.parent("ul");
59    if ($_this.find("ul").css('display') === "none") {
60        //收起其他菜单栏
61        var level = dropdown.find('.level2-menu');
62        level.slideUp("slow");
63        //显示点击栏目
64        $_this.find('ul').slideDown('slow');
65        return false;
66    }
67});
68
69//点击分类按钮显示隐藏层
70$(".navbar-toggle").click(function () {
71    var _this = $(".current_app");
72
73    $(".select-tr").removeClass("select-tr");
74
75    if (_this.parents(".level2-menu").html() === undefined && _this.parents(".dropdown-menu").html() !== undefined) {//二级目录
76        var click = _this.parents(".dropdown_click");
77        //默认选中一级分类
78        click.addClass("select-tr").siblings('li').removeClass('select-tr');
79        //选中二级分类
80        _this.parent("li").addClass('select-tow');
81        //显示分类
82        var html = click.find(".dropdown-menu").html();
83        $(".menu_other").html('<ul class="show">' + html + "</ul>");
84        $(".menu_other").css('display', 'block');
85
86    } else if (_this.parents(".level2-menu").html() !== undefined) {//三级目录
87        var click = _this.parents(".dropdown_click");
88        //默认选中一级分类
89        click.addClass("select-tr").siblings('li').removeClass('select-tr');
90        //选中二级分类
91        var level2_menu = _this.parents(".level2-menu");
92        level2_menu.parent('li').addClass('select-tow');
93        //显示分类
94        var html = click.find(".dropdown-menu").html();
95        $(".menu_other").html('<ul class="show">' + html + "</ul>");
96        $(".menu_other").css('display', 'block');
97        //标注三级目录
98        $(".current_app").parent('li').addClass("select-s");
99        //显示三级目录
100        $('.select-tow').find('ul').slideDown(0);
101    } else if (_this.parents(".dropdown-menu").html() === undefined) {
102        _this.parent('li').addClass("select-tr");
103    }
104
105    if ($(".show_log").is(":hidden")) {
106        $(".show_log").css("display", "block");
107        $(".menu .menu_first").addClass("menu_first_click");
108    } else {
109        $(".menu_other").css('display', 'none');
110        $(".menu .menu_first").removeClass("menu_first_click");
111        $(".show_log").css("display", "none");
112    }
113
114});
115$(function () {
116    $(".qiyeweixin").click(function () {
117        var url = $(this).attr("url");
118        if (url == undefined) {
119            return false;
120        } else {
121            $(".float-weixin").html('<img src="' + url + '">');
122            $(".float-weixin").show(400);
123        }
124    });
125    $(".float-weixin").click(function () {
126        $(this).css("display", "none");
127    });
128
129
130
131    //客服点击下拉
132    $(".floatDqq .i-li").click(function () {
133        //判断是否为显示页面
134        if ($(this).find('.i-con').is(":hidden")) {
135            
136        } else {
137            //判断兄弟节点是否有展开栏目
138            $(this).siblings('.i-li').each(function (i, n) {
139
140                if ($(n).hasClass('is_show')) {
141                    var index = $(n).attr("hidden-index");
142                    $(n).removeClass("li-display-" + index);
143                    $(n).removeClass("is_show");
144                    $(n).find('.i-con').removeClass("upward-s");
145                }
146            });
147
148            var now_index = $(this).attr("hidden-index");
149            $(this).addClass("li-display-" + now_index);
150            $(this).addClass("is_show");
151            $(this).find('.i-con').addClass("upward-s");
152        }
153    })
154	
155	//获取分类ID
156	var typeid = $('#type_id').val();
157	$('.type'+typeid).addClass('active');
158
159
160	//获取topid
161	var thisTypeid = $('#thisTypeid').val();
162	$('#e'+thisTypeid).css({height: '100%'});
163	$('#e'+thisTypeid+" span").css({
164								  'display': 'block',
165								  'padding-left': '15px',
166								  'background': 'url(/templets/ltech-new/images/master-sprite-8.gif) no-repeat 0px center',
167								  'cursor': 'pointer'
168								});	
169	
170	//自动识别导航
171	var showVal = $("#showVal").val();
172	$("."+showVal).addClass("active");
173})
174
175
176//筛选按钮
177var type_id = $(" input[ name='type_id' ] ").val();
178
179if (type_id != undefined) {
180    //设置请求方法
181    var request_type = "get_screen";
182
183    $.ajax({
184        url: '/plus/screen_en.php',
185        type: 'post',
186        dataType: 'json',
187        data: {type_id: type_id, request_type: request_type},
188        success: function (data) {
189            $('.screen').html(data);
190        }, error: function (err) {
191            console.log(err)
192        }
193    })
194
195    //判断是否为页面后退到本页面
196    window.addEventListener('pageshow', function (event) {
197        if (event.persisted || window.performance && window.performance.navigation.type == 2) {
198			
199                    //页面返回是操作
200                    var valInfo = sessionStorage.getItem('valInfo', valInfo);
201                    var authentication = sessionStorage.getItem('authentication', authentication);
202			if(valInfo==null && authentication == null){
203				return true;
204			}else{
205				$.ajax({
206					url: '/plus/screen_en.php',
207					type: 'post',
208					dataType: 'json',
209					data: {type_id: type_id, request_type: "get_info", is_black: 'yes'},
210					success: function (data) {
211						//判断是否为三级目录
212						if (data.is_top == 1) {
213							$('.product_info').html(data.innerHtml);
214						} else {
215							$('.updateInfo').html(data.innerHtml);
216						}
217
218						//下拉框后退记录记录
219						if (valInfo !== "") {
220							$('.screen').find("select").each(function () {
221								$(this).find('option').each(function () {
222									//判断是否选中
223									var isSelected = new RegExp($(this).val());
224									if (isSelected.test(valInfo)) {
225										$(this).attr('selected', 'selected');
226									}
227								})
228
229							})
230						}
231
232						//认证框后退记录
233						if (authentication !== "") {
234							$("input[name='authentication']:checkbox").each(function () {
235								var isChecked = new RegExp($(this).val());
236								if (isChecked.test(authentication)) {
237									$(this).attr('checked', 'checked');
238								}
239							})
240						}
241
242					}, error: function (err) {
243						console.log(err);
244					}
245				})
246			}
247
248        } else if (event.persisted || window.performance && window.performance.navigation.type == 1) {
249            $.ajax({
250                url: '/plus/screen_en.php',
251                type: 'post',
252                dataType: 'json',
253                data: {type_id: type_id, request_type: "get_info", is_black: 'refresh'},
254                success: function (data) {
255                    sessionStorage.removeItem('valInfo');
256                    sessionStorage.removeItem('authentication');
257                }, error: function (err) {
258                    console.log(err);
259                }
260            })
261        } else {
262            $.ajax({
263                url: '/plus/screen_en.php',
264                type: 'post',
265                dataType: 'json',
266                data: {type_id: type_id, request_type: "get_info", is_black: 'reload'},
267                success: function (data) {
268                    sessionStorage.removeItem('valInfo');
269                    sessionStorage.removeItem('authentication');
270                }, error: function (err) {
271                    console.log(err);
272                }
273            })
274        }
275    }, false);
276}
277
278//delegate
279$(".screen_click").delegate('.screen_from', 'change', function () {
280    //获取选中项值
281    var valInfo = [];
282    //获取认证
283    var authentication = [];
284    request_type = "get_info";
285
286    $('input[name="authentication"]:checked').each(function (a, info_item) {
287        if (info_item.value !== "")
288            authentication[a] = info_item.value;
289    })
290
291    var key = 0;
292    $('.screen').find('select').each(function (i, item) {
293        if (item.value != 0) {
294            valInfo[key] = item.value;
295            key++;
296        }
297    })
298    //页面返回是操作
299    sessionStorage.setItem('valInfo', valInfo);
300    sessionStorage.setItem('authentication', authentication);
301
302    $.ajax({
303        url: '/plus/screen_en.php',
304        type: 'post',
305        dataType: 'json',
306        data: {valInfo: valInfo, type_id: type_id, request_type: request_type, authentication: authentication},
307        success: function (data) {
308            //判断是否为三级目录
309            if (data.is_top == 1) {
310                $('.product_info').html(data.innerHtml);
311            } else {
312                $('.updateInfo').html(data.innerHtml);
313            }
314        }, error: function (err) {
315            console.log(err);
316        }
317    });
318})
319
320//点击筛选多选框去除其他多选框的选中
321$('.authentication input').click(function(){
322
323	 if($(this).is(":checked") == false){
324		$(this).parent('span').css('color','rgb(102, 102, 102)'); 
325	 }else{
326		var _this = $(this).parent('span');
327		_this.css('color','red');	 
328	 }
329
330	
331	_this.siblings('span').find('input').attr("checked",false);
332	_this.siblings('span').css('color','rgb(102, 102, 102)');
333	
334})
335
336
337//详情视频点击播放
338$(".video_info_item").click(function () {
339    var videoInfo = $(this).find(".video_url").val();
340
341    if (videoInfo !== "") {
342        $('.video_hidden').css("display", "block");
343        $(".video_hidden").find("video").attr("src", videoInfo);
344    } else {
345        alert("视频不存在");
346    }
347});
348
349$(function () {
350    var breadcrumb = $(".breadcrumb").html();
351	if(breadcrumb !== undefined){
352		//breadcrumb = breadcrumb.replace('/','/html/en/');
353		breadcrumb = breadcrumb.replace('首页','Home');
354
355		$(".local .fa-home").after(breadcrumb);
356	}
357})
358
359

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.