PageSourceSearch

https://www.ppzhan.com/NewShowStand/js/pageHeight.js

js ppzhan.com collected 2026-10-07 22:51:21 UTC 3,568 bytes, 67 lines download raw bytes

1    var topClassHeight = 35;
2    var secClassHeight = 22;
3    function collapseClass(ph) {
4        //----计算左侧菜单高度,根据情况折叠
5        var topClassCount = jQuery("#clientClass ul").length;
6        var secClassCount = jQuery("#clientClass ul li").length;
7        var totalHeight = topClassCount * topClassHeight + secClassCount * secClassHeight + 260 + 480;//加上顶部和底部高度
8
9        if (totalHeight > ph) { //需要折叠,
10            jQuery("#clientClass ul:first").show();
11            jQuery("#clientClass p:first img").attr("src", "/NewShowStand/images/Public/jian.jpg");
12        } else {
13            jQuery("#clientClass ul").show();
14            jQuery("#clientClass p img").attr("src", "/NewShowStand/images/Public/jian.jpg");
15        }
16    }
17    jQuery(document).ready(function () {
18        var pageHeight = 0;
19        var isIndex = false;
20        var pattern = /\/st\d+(\/{0,1}(index.html){0,1})$/i; ;
21        if (location.href.match(pattern) != null) { //是首页,则存储页面高度
22            isIndex = true;
23            pageHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
24            WriteCookies("IndexPageHeight" + intCompanyID, pageHeight, 365);
25        } else {
26            pageHeight = ReadCookies("IndexPageHeight" + intCompanyID);
27            if (pageHeight == "")
28                pageHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
29        }
30        if (isIndex) {//是首页,则按既定规则折叠
31            collapseClass(pageHeight);
32        } else { //是其它页面
33            if (location.href.indexOf("/list_") > 0 || location.href.indexOf("/erlist_") > 0) //是产品分类页
34            {
35                var topClassCount = jQuery("#clientClass ul").length;
36                var secClassCount = jQuery("#clientClass ul li").length;
37                var totalHeight = topClassCount * topClassHeight + secClassCount * secClassHeight;
38                if (totalHeight > pageHeight) { //需要折叠,但分类页的折叠,是要计算过的。
39                    //----计算展开哪个二级类
40                    var isTopClass = false;
41                    jQuery("#clientClass p a").each(function (i) {
42                        if (location.href.indexOf(jQuery(this).attr("href")) > 0) {
43                            jQuery(this).parent().next().show();
44                            jQuery(this).prev().attr("src", "/NewShowStand/images/Public/jian.jpg");
45                            isTopClass = true;
46                            return false;
47                        }
48                    });
49
50                    if (!isTopClass) {
51                        jQuery("#clientClass ul li a").each(function (i) {
52                            if (location.href.indexOf(jQuery(this).attr("href")) > 0) {
53                                jQuery(this).parent().parent().show();
54                                jQuery(this).parent().parent().prev().find("img").attr("src", "/NewShowStand/images/Public/jian.jpg");
55                                return false;
56                            }
57                        });
58                    }
59                } else {
60                    jQuery("#clientClass ul").show();
61                    jQuery("#clientClass p img").attr("src", "/NewShowStand/images/Public/jian.jpg");
62                }
63            } else { //是其它页面
64                collapseClass(pageHeight);
65            }
66        }
67    });

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.