PageSourceSearch

https://ubd.edu.bn/wp-content/plugins/image-hover-effects-ultimate…/asset/frontend/js/jquery.js?ver=2.9.8

js ubd.edu.bn collected 2026-10-02 05:01:25 UTC 11,961 bytes, 332 lines download raw bytes

1jQuery.noConflict();
2(function ($) {
3    'use strict';
4
5    var InitWaypointAnimations = (function () {
6        function onScrollInitAnimation(items, container, options) {
7            const containerOffset = (container) ? container.attr("sa-data-animation-offset") || options.offset : null;
8            items.each(function () {
9                const element = $(this),
10                        animationClass = element.attr("sa-data-animation"),
11                        animationDelay = element.attr("sa-data-animation-delay") || options.delay,
12                        animationDuration = element.attr("sa-data-animation-duration") || options.delay,
13                        animationOffset = element.attr("sa-data-animation-offset") || options.offset;
14
15                element.css({
16                    "-webkit-animation-delay": animationDelay,
17                    "-moz-animation-delay": animationDelay,
18                    "animation-delay": animationDelay,
19                    "animation-duration": animationDuration
20                });
21
22                const trigger = (container) ? container : element;
23
24                trigger.waypoint(function () {
25                    element
26                            .addClass("animated")
27                            .addClass(animationClass);
28
29                }, {
30                    triggerOnce: true,
31                    offset: containerOffset || animationOffset
32                });
33            });
34        }
35
36        function InitWaypointAnimations(defaults) {
37            if (!defaults) {
38                defaults = {};
39            }
40            const options = {
41                offset: defaults.offset || "90%",
42                delay: defaults.delay || "0ms",
43                animateClass: defaults.animateClass || "sa-data-animation",
44                animateGroupClass: defaults.animateGroupClass || "sa-data-animation-group"
45            }
46
47            const animateGroupClassSelector = classToSelector(options.animateGroupClass);
48            const animateClassSelector = classToSelector(options.animateClass);
49
50            // Attach waypoint animations to grouped animate elements
51            $(animateGroupClassSelector).each((index, group) => {
52                const container = $(group);
53                const items = $(group).find(animateClassSelector);
54                onScrollInitAnimation(items, container, options);
55            });
56
57            // Attach waypoint animations to ungrouped animate elements
58            $(animateClassSelector)
59                    .filter((index, element) => {
60                        return $(element).parents(animateGroupClassSelector).length === 0;
61                    })
62                    .each((index, element) => {
63                        onScrollInitAnimation($(element), null, options);
64                    });
65        }
66
67        function classToSelector(className) {
68            return "." + className;
69        }
70
71        return InitWaypointAnimations;
72    }());
73
74    $(document).ready(function () {
75        InitWaypointAnimations();
76    });
77
78    $("[sa-data-animation]").each(function (index, value) {
79        if ($(this).attr('sa-data-animation') !== '') {
80            $(this).addClass('sa-data-animation');
81//            var osAnimationDelay = $(this).attr('sa-data-animation-delay');
82//            var osAnimationduration = $(this).attr('sa-data-animation-duration');
83//            $(this).css({
84//                'animation-delay': osAnimationDelay + 'ms',
85//                'animation-duration': osAnimationduration + 'ms'
86//            });
87        }
88    });
89
90
91    function OxiAddonsEqualHeightWidth(data) {
92        var cw = $(data).outerWidth();
93        var ch = $(data).outerHeight();
94        if (cw > ch) {
95            $(data).css({"height": cw + "px"});
96            $(data).css({"width": cw + "px"});
97        } else {
98            $(data).css({"height": ch + "px"});
99            $(data).css({"width": ch + "px"});
100        }
101    }
102    setTimeout(function () {
103        OxiAddonsEqualHeightWidth($(".OxiAddonsEqualHeightWidth"));
104    }, 1500);
105    function oxiequalHeight(group) {
106        var tallest = 0;
107        group.each(function () {
108            thisHeight = $(this).height();
109            if (thisHeight > tallest) {
110                tallest = thisHeight;
111            }
112        });
113        group.height(tallest);
114    }
115    setTimeout(function () {
116        oxiequalHeight($(".oxiequalHeight"));
117    }, 1500);
118
119    function oxiequalouterHeight(group) {
120        var tallest = 0;
121        group.each(function () {
122            thisHeight = $(this).outerHeight();
123            if (thisHeight > tallest) {
124                tallest = thisHeight;
125            }
126        });
127        group.outerHeight(tallest);
128    }
129    setTimeout(function () {
130        oxiequalouterHeight($(".oxiequalouterHeight"));
131    }, 1500);
132
133    $('.oxi-addons-button-admin-style').each(function () {
134        var data = $(this).attr('oxidata');
135        $("#" + data).css("transition", "none");
136        $("#" + data).slideUp();
137    });
138    $(".oxi-addons-button-flex-box .oxi-addons-button-admin-style:first-child").each(function () {
139        $(this).addClass("oxi-active");
140        var firstchildclass = $(this).attr("oxidata");
141        $("#" + firstchildclass).slideDown();
142    });
143
144    $(".oxi-addons-button-admin-style").on("click", function () {
145        $(this).siblings().removeClass("oxi-active");
146        $(this).addClass("oxi-active");
147        $(this).siblings().each(function () {
148            var idvalue = $(this).attr("oxidata");
149            $("#" + idvalue).fadeOut();
150        });
151        var datavalue = $(this).attr("oxidata");
152        $("#" + datavalue).fadeIn();
153    });
154
155
156    var namespace = 'jquery-Oxiplate';
157    $("[oxi-addons-d-animation]").each(function (index, value) {
158        $(this).addClass($(this).attr("oxi-addons-d-animation"));
159    });
160    function OxiPlate($element, options) {
161        this.config(options);
162
163        this.$container = $element;
164        if (this.options.element) {
165            if (typeof this.options.element === 'string') {
166                this.$element = this.$container.find(this.options.element);
167            } else {
168                this.$element = $(this.options.element);
169            }
170        } else {
171            this.$element = $element;
172        }
173
174        this.originalTransform = this.$element.css('transform');
175        this.$container
176                .on('mouseenter.' + namespace, this.onMouseEnter.bind(this))
177                .on('mouseleave.' + namespace, this.onMouseLeave.bind(this))
178                .on('mousemove.' + namespace, this.onMouseMove.bind(this));
179    }
180
181    OxiPlate.prototype.config = function (options) {
182        this.options = $.extend({
183            inverse: false,
184            perspective: 500,
185            maxRotation: 10,
186            animationDuration: 200
187        }, this.options, options);
188    };
189
190    OxiPlate.prototype.destroy = function () {
191        this.$element.css('transform', this.originalTransform);
192        this.$container.off('.' + namespace);
193    };
194
195    OxiPlate.prototype.update = function (offsetX, offsetY, duration) {
196        var rotateX;
197        var rotateY;
198
199        if (offsetX || offsetX === 0) {
200            var height = this.$container.outerHeight();
201            var py = (offsetY - height / 2) / (height / 2);
202            rotateX = this.round(this.options.maxRotation * -py);
203        } else {
204            rotateY = 0;
205        }
206
207        if (offsetY || offsetY === 0) {
208            var width = this.$container.outerWidth();
209            var px = (offsetX - width / 2) / (width / 2);
210            rotateY = this.round(this.options.maxRotation * px);
211        } else {
212            rotateX = 0;
213        }
214
215        if (this.options.inverse) {
216            rotateX *= -1;
217            rotateY *= -1;
218        }
219
220        if (duration) {
221            this.animate(rotateX, rotateY, duration);
222        } else if (this.animation && this.animation.remaining) {
223            this.animation.targetX = rotateX;
224            this.animation.targetY = rotateY;
225        } else {
226            this.transform(rotateX, rotateY);
227        }
228    };
229
230    OxiPlate.prototype.reset = function (duration) {
231        this.update(null, null, duration);
232    };
233
234    OxiPlate.prototype.transform = function (rotateX, rotateY) {
235        this.currentX = rotateX;
236        this.currentY = rotateY;
237        this.$element.css('transform',
238                (this.originalTransform && this.originalTransform !== 'none' ? this.originalTransform + ' ' : '') +
239                'perspective(' + this.options.perspective + 'px) ' +
240                'rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'
241                );
242    };
243
244    OxiPlate.prototype.animate = function (rotateX, rotateY, duration) {
245        if (duration) {
246            this.animation = this.animation || {};
247
248            var remaining = this.animation.remaining;
249            this.animation.time = performance.now();
250            this.animation.remaining = duration || null;
251            this.animation.targetX = rotateX;
252            this.animation.targetY = rotateY;
253
254            if (!remaining) {
255                requestAnimationFrame(this.onAnimationFrame.bind(this));
256            }
257        } else {
258            this.transform(rotateX, rotateY);
259        }
260    };
261
262    OxiPlate.prototype.round = function (number) {
263        return Math.round(number * 1000) / 1000;
264    };
265
266    OxiPlate.prototype.offsetCoords = function (event) {
267        var offset = this.$container.offset();
268        return {
269            x: event.pageX - offset.left,
270            y: event.pageY - offset.top
271        };
272    };
273
274    OxiPlate.prototype.onAnimationFrame = function (timestamp) {
275        this.animation = this.animation || {};
276
277        var delta = timestamp - (this.animation.time || 0);
278        this.animation.time = timestamp;
279
280        var duration = this.animation.remaining || 0;
281        var percent = Math.min(delta / duration, 1);
282        var currentX = this.currentX || 0;
283        var currentY = this.currentY || 0;
284        var targetX = this.animation.targetX || 0;
285        var targetY = this.animation.targetY || 0;
286        var rotateX = this.round(currentX + (targetX - currentX) * percent);
287        var rotateY = this.round(currentY + (targetY - currentY) * percent);
288        this.transform(rotateX, rotateY);
289
290        var remaining = duration - delta;
291        this.animation.remaining = remaining > 0 ? remaining : null;
292        if (remaining > 0) {
293            requestAnimationFrame(this.onAnimationFrame.bind(this));
294        }
295    };
296
297    OxiPlate.prototype.onMouseEnter = function (event) {
298        var offset = this.offsetCoords(event);
299        this.update(offset.x, offset.y, this.options.animationDuration);
300    };
301
302    OxiPlate.prototype.onMouseLeave = function (event) {
303        this.reset(this.options.animationDuration);
304    };
305
306    OxiPlate.prototype.onMouseMove = function (event) {
307        var offset = this.offsetCoords(event);
308        this.update(offset.x, offset.y);
309    };
310
311    $.fn.Oxiplate = function (options) {
312        return this.each(function () {
313            var $element = $(this);
314            var Oxiplate = $element.data(namespace);
315
316            if (options === 'remove') {
317                Oxiplate.destroy();
318                $element.data(namespace, null);
319            } else {
320                if (!Oxiplate) {
321                    Oxiplate = new OxiPlate($element, options);
322                    $element.data(namespace, Oxiplate);
323                    Oxiplate.reset();
324                } else {
325                    Oxiplate.config(options);
326                }
327            }
328        });
329    };
330  
331})(jQuery);
332

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.