PageSourceSearch

https://www.ssupl.com/data/skin/front/19-07_C/js/ming/jquery.mallcategory.js

js ssupl.com collected 2026-10-09 23:38:17 UTC 9,231 bytes, 256 lines download raw bytes

1/*================================================================================
2 * @name: bPopup - if you can't get it up, use bPopup
3 * @author: (c)Bjoern Klinggaard (twitter@bklinggaard)
4 * @demo: http://dinbror.dk/bpopup
5 * @version: 0.11.0.min
6 ================================================================================*/
7(function(c) {
8    c.fn.mAllCategory = function(A, E) {
9        function L() {
10            a.contentContainer = c(a.contentContainer || b);
11            switch (a.content) {
12                case "iframe":
13                    var d = c('<iframe class="b-iframe" ' + a.iframeAttr + "></iframe>");
14                    d.appendTo(a.contentContainer);
15                    t = b.outerHeight(!0);
16                    u = b.outerWidth(!0);
17                    B();
18                    d.attr("src", a.loadUrl);
19                    l(a.loadCallback);
20                    break;
21                case "image":
22                    B();
23                    c("<img />").load(function() {
24                        l(a.loadCallback);
25                        F(c(this))
26                    }).attr("src", a.loadUrl).hide().appendTo(a.contentContainer);
27                    break;
28                default:
29                    B(), c('<div class="b-ajax-wrapper"></div>').load(a.loadUrl, a.loadData, function(d, b, e) {
30                        l(a.loadCallback, b);
31                        F(c(this))
32                    }).hide().appendTo(a.contentContainer)
33            }
34        }
35
36        function B() {
37            a.modal && c('<div class="b-modal ' + e + '"></div>').css({
38                backgroundColor: a.modalColor,
39                position: "fixed",
40                top: 0,
41                right: 0,
42                bottom: 0,
43                left: 0,
44                opacity: 0,
45                zIndex: a.zIndex + v
46            }).appendTo(a.appendTo).fadeTo(a.speed, a.opacity);
47            C();
48            b.data("bPopup", a).data("id", e).css({
49                left: "slideIn" == a.transition || "slideBack" == a.transition ? "slideBack" == a.transition ? f.scrollLeft() + w : -1 * (x + u) : m(!(!a.follow[0] && n || g)),
50                position: a.positionStyle || "absolute",
51                top: "slideDown" == a.transition || "slideUp" == a.transition ? "slideUp" == a.transition ? f.scrollTop() + y : z + -1 * t : p(!(!a.follow[1] && q || g)),
52                "z-index": a.zIndex + v + 1
53            }).each(function() {
54                a.appending && c(this).appendTo(a.appendTo)
55            });
56            G(!0)
57        }
58
59        function r() {
60            a.modal && c(".b-modal." + b.data("id")).fadeTo(a.speed, 0, function() {
61                c(this).remove()
62            });
63            a.scrollBar || c("html").css("overflow", "auto");
64            c(".b-modal." + e).unbind("click");
65            f.unbind("keydown." + e);
66            k.unbind("." + e).data("bPopup", 0 < k.data("bPopup") - 1 ? k.data("bPopup") - 1 : null);
67            b.undelegate(".bClose, ." + a.closeClass, "click." + e, r).data("bPopup", null);
68            clearTimeout(H);
69            G();
70            return !1
71        }
72
73        function I(d) {
74            y = k.height();
75            w = k.width();
76            h = D();
77            if (h.x || h.y) clearTimeout(J), J = setTimeout(function() {
78                C();
79                d = d || a.followSpeed;
80                var e = {};
81                h.x && (e.left = a.follow[0] ? m(!0) : "auto");
82                h.y && (e.top = a.follow[1] ? p(!0) : "auto");
83                b.dequeue().each(function() {
84                    g ? c(this).css({
85                        left: x,
86                        top: z
87                    }) : c(this).animate(e, d, a.followEasing)
88                })
89            }, 50)
90        }
91
92        function F(d) {
93            var c = d.width(),
94                e = d.height(),
95                f = {};
96            a.contentContainer.css({
97                height: e,
98                width: c
99            });
100            e >
100= b.height() && (f.height = b.height());
101            c >= b.width() && (f.width = b.width());
102            t = b.outerHeight(!0);
103            u = b.outerWidth(!0);
104            C();
105            a.contentContainer.css({
106                height: "auto",
107                width: "auto"
108            });
109            f.left = m(!(!a.follow[0] && n || g));
110            f.top = p(!(!a.follow[1] && q || g));
111            b.animate(f, 250, function() {
112                d.show();
113                h = D()
114            })
115        }
116
117        function M() {
118            k.data("bPopup", v);
119            b.delegate(".bClose, ." + a.closeClass, "click." + e, r);
120            a.modalClose && c(".b-modal." + e).css("cursor", "pointer").bind("click", r);
121            N || !a.follow[0] && !a.follow[1] || k.bind("scroll." + e, function() {
122                if (h.x || h.y) {
123                    var d = {};
124                    h.x && (d.left = a.follow[0] ? m(!g) : "auto");
125                    h.y && (d.top = a.follow[1] ? p(!g) : "auto");
126                    b.dequeue().animate(d, a.followSpeed, a.followEasing)
127                }
128            }).bind("resize." + e, function() {
129                I()
130            });
131            a.escClose && f.bind("keydown." + e, function(a) {
132                27 == a.which && r()
133            })
134        }
135
136        function G(d) {
137            function c(e) {
138                b.css({
139                    display: "block",
140                    opacity: 1
141                }).animate(e, a.speed, a.easing, function() {
142                    K(d)
143                })
144            }
145            switch (d ? a.transition : a.transitionClose || a.transition) {
146                case "slideIn":
147                    c({
148                        left: d ? m(!(!a.follow[0] && n || g)) : f.scrollLeft() - (u || b.outerWidth(!0)) - 200
149                    });
150                    break;
151                case "slideBack":
152                    c({
153                        left: d ? m(!(!a.follow[0] && n || g)) : f.scrollLeft() + w + 200
154                    });
155                    break;
156                case "slideDown":
157                    c({
158                        top: d ? p(!(!a.follow[1] && q || g)) : f.scrollTop() - (t || b.outerHeight(!0)) - 200
159                    });
160                    break;
161                case "slideUp":
162                    c({
163                        top: d ? p(!(!a.follow[1] && q || g)) : f.scrollTop() + y + 200
164                    });
165                    break;
166                default:
167                    b.stop().fadeTo(a.speed, d ? 1 : 0, function() {
168                        K(d)
169                    })
170            }
171        }
172
173        function K(d) {
174            d ? (M(), l(E), a.autoClose && (H = setTimeout(r, a.autoClose))) : (b.hide(), l(a.onClose), a.loadUrl && (a.contentContainer.empty(), b.css({
175                height: "auto",
176                width: "auto"
177            })))
178        }
179
180        function m(a) {
181            return a ? x + f.scrollLeft() : x
182        }
183
184        function p(a) {
185            return a ? z + f.scrollTop() : z
186        }
187
188        function l(a, e) {
189            c.isFunction(a) && a.call(b, e)
190        }
191
192        function C() {
193            z = q ? a.position[1] : Math.max(0, (y - b.outerHeight(!0)) / 2 - a.amsl);
194            x = n ? a.position[0] : (w - b.outerWidth(!0)) / 2;
195            h = D()
196        }
197
198        function D() {
199            return {
200                x: w > b.outerWidth(!0),
201                y: y > b.outerHeight(!0)
202            }
203        }
204        c.isFunction(A) && (E = A, A = null);
205        var a = c.extend({}, c.fn.mAllCategory.defaults, A);
206        a.scrollBar || c("html").css("overflow", "hidden");
207        var b = this,
208            f = c(document),
209            k = c(window),
210            y = k.height(),
211            w = k.width(),
212            N = /OS 6(_\d)+/i.test(navigator.userAgent),
213            v = 0,
214            e, h, q, n, g, z, x, t, u, J, H;
215        b.close = function() {
216            r()
217        };
218        b.reposition = function(a) {
219            I(a)
220        };
221        return b.each(function() {
222            c(this).data("bPopup") || (l(a.onOpen), v = (k.data("bPopup") || 0) + 1, e = "__b-popup" + v + "__", q = "auto" !== a.position[1], n = "auto" !== a.position[0], g = "fixed" === a.positionStyle, t = b.outerHeight(!0), u = b.outerWidth(!0), a.loadUrl ? L() : B())
223        })
224    };
225    c.fn.mAllCategory.defaults = {
226        amsl: 50,
227        appending: !0,
228        appendTo: "body",
229        autoClose: !1,
230        closeClass: "b-close",
231        content: "ajax",
232        contentContainer: !1,
233        easing: "swing",
234        escClose: !0,
235        follow: [!0, !0],
236        followEasing: "swing",
237        followSpeed: 500,
238        iframeAttr: 'scrolling="no" frameborder="0"',
239        loadCallback: !1,
240        loadData: !1,
241        loadUrl: !1,
242        modal: !0,
243        modalClose: !0,
244        modalColor: "#000",
245        onClose: !1,
246        onOpen: !1,
247        opacity: .7,
248        position: ["auto", "auto"],
249        positionStyle: "absolute",
250        scrollBar: !0,
251        speed: 250,
252        transition: "fadeIn",
253        transitionClose: !1,
254        zIndex: 9997
255    }
256})(jQuery);

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.