TweenMax.js
1 year ago
anime.js
1 year ago
flipster.js
1 year ago
headroom.js
1 year ago
iscroll.js
1 year ago
isotope.js
1 year ago
jquery-countdown.js
1 year ago
jquery-mousewheel.js
1 year ago
jquery-slimscroll.js
1 year ago
lottie.js
1 year ago
luxon.js
1 year ago
markerclusterer.js
1 year ago
modal.js
1 year ago
motionpath.js
1 year ago
pa-gsap.js
1 year ago
pa-scrolldir.js
1 year ago
premium-addons.js
1 year ago
premium-banner.js
1 year ago
premium-blog.js
1 year ago
premium-button.js
1 year ago
premium-carousel-widget.js
1 year ago
premium-contact-form.js
1 year ago
premium-countdown-timer.js
1 year ago
premium-counter.js
1 year ago
premium-dis-conditions.js
1 year ago
premium-dual-header.js
1 year ago
premium-eq-height.js
1 year ago
premium-fancy-text.js
1 year ago
premium-floating-effects.js
1 year ago
premium-global-tooltips.js
1 year ago
premium-icon-list.js
1 year ago
premium-image-button.js
1 year ago
premium-image-scroll.js
1 year ago
premium-img-gallery.js
1 year ago
premium-maps.js
1 year ago
premium-media-wheel.js
1 year ago
premium-mini-cart.js
1 year ago
premium-mobile-menu.js
1 year ago
premium-modal-box.js
1 year ago
premium-nav-menu.js
1 year ago
premium-notifications.js
1 year ago
premium-person.js
1 year ago
premium-pinterest-feed.js
1 year ago
premium-post-ticker.js
1 year ago
premium-progressbar.js
1 year ago
premium-search-form.js
1 year ago
premium-shape-divider.js
1 year ago
premium-svg-drawer.js
1 year ago
premium-tcloud.js
1 year ago
premium-testimonials.js
1 year ago
premium-textual-showcase.js
1 year ago
premium-tiktok-feed.js
1 year ago
premium-title.js
1 year ago
premium-video-box.js
1 year ago
premium-vscroll.js
1 year ago
premium-weather.js
1 year ago
premium-woo-categories.js
1 year ago
premium-woo-cta.js
1 year ago
premium-woo-products.js
1 year ago
premium-world-clock.js
1 year ago
premium-wrapper-link.js
1 year ago
prettyPhoto.js
1 year ago
scrollTrigger.js
1 year ago
slick.js
1 year ago
tooltipster.js
1 year ago
typed.js
1 year ago
universal-tilt.js
1 year ago
vticker.js
1 year ago
jquery-mousewheel.js
119 lines
| 1 | /*! |
| 2 | * jQuery Mousewheel 3.1.13 |
| 3 | */ |
| 4 | !function(a) { |
| 5 | "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery) |
| 6 | }(function(a) { |
| 7 | function b(b) { |
| 8 | var g = b || window.event |
| 9 | , h = i.call(arguments, 1) |
| 10 | , j = 0 |
| 11 | , l = 0 |
| 12 | , m = 0 |
| 13 | , n = 0 |
| 14 | , o = 0 |
| 15 | , p = 0; |
| 16 | if (b = a.event.fix(g), |
| 17 | b.type = "mousewheel", |
| 18 | "detail"in g && (m = -1 * g.detail), |
| 19 | "wheelDelta"in g && (m = g.wheelDelta), |
| 20 | "wheelDeltaY"in g && (m = g.wheelDeltaY), |
| 21 | "wheelDeltaX"in g && (l = -1 * g.wheelDeltaX), |
| 22 | "axis"in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m, |
| 23 | m = 0), |
| 24 | j = 0 === m ? l : m, |
| 25 | "deltaY"in g && (m = -1 * g.deltaY, |
| 26 | j = m), |
| 27 | "deltaX"in g && (l = g.deltaX, |
| 28 | 0 === m && (j = -1 * l)), |
| 29 | 0 !== m || 0 !== l) { |
| 30 | if (1 === g.deltaMode) { |
| 31 | var q = a.data(this, "mousewheel-line-height"); |
| 32 | j *= q, |
| 33 | m *= q, |
| 34 | l *= q |
| 35 | } else if (2 === g.deltaMode) { |
| 36 | var r = a.data(this, "mousewheel-page-height"); |
| 37 | j *= r, |
| 38 | m *= r, |
| 39 | l *= r |
| 40 | } |
| 41 | if (n = Math.max(Math.abs(m), Math.abs(l)), |
| 42 | (!f || f > n) && (f = n, |
| 43 | d(g, n) && (f /= 40)), |
| 44 | d(g, n) && (j /= 40, |
| 45 | l /= 40, |
| 46 | m /= 40), |
| 47 | j = Math[j >= 1 ? "floor" : "ceil"](j / f), |
| 48 | l = Math[l >= 1 ? "floor" : "ceil"](l / f), |
| 49 | m = Math[m >= 1 ? "floor" : "ceil"](m / f), |
| 50 | k.settings.normalizeOffset && this.getBoundingClientRect) { |
| 51 | var s = this.getBoundingClientRect(); |
| 52 | o = b.clientX - s.left, |
| 53 | p = b.clientY - s.top |
| 54 | } |
| 55 | return b.deltaX = l, |
| 56 | b.deltaY = m, |
| 57 | b.deltaFactor = f, |
| 58 | b.offsetX = o, |
| 59 | b.offsetY = p, |
| 60 | b.deltaMode = 0, |
| 61 | h.unshift(b, j, l, m), |
| 62 | e && clearTimeout(e), |
| 63 | e = setTimeout(c, 200), |
| 64 | (a.event.dispatch || a.event.handle).apply(this, h) |
| 65 | } |
| 66 | } |
| 67 | function c() { |
| 68 | f = null |
| 69 | } |
| 70 | function d(a, b) { |
| 71 | return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 |
| 72 | } |
| 73 | var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], h = "onwheel"in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], i = Array.prototype.slice; |
| 74 | if (a.event.fixHooks) |
| 75 | for (var j = g.length; j; ) |
| 76 | a.event.fixHooks[g[--j]] = a.event.mouseHooks; |
| 77 | var k = a.event.special.mousewheel = { |
| 78 | version: "3.1.12", |
| 79 | setup: function() { |
| 80 | if (this.addEventListener) |
| 81 | for (var c = h.length; c; ) |
| 82 | this.addEventListener(h[--c], b, !1); |
| 83 | else |
| 84 | this.onmousewheel = b; |
| 85 | a.data(this, "mousewheel-line-height", k.getLineHeight(this)), |
| 86 | a.data(this, "mousewheel-page-height", k.getPageHeight(this)) |
| 87 | }, |
| 88 | teardown: function() { |
| 89 | if (this.removeEventListener) |
| 90 | for (var c = h.length; c; ) |
| 91 | this.removeEventListener(h[--c], b, !1); |
| 92 | else |
| 93 | this.onmousewheel = null; |
| 94 | a.removeData(this, "mousewheel-line-height"), |
| 95 | a.removeData(this, "mousewheel-page-height") |
| 96 | }, |
| 97 | getLineHeight: function(b) { |
| 98 | var c = a(b) |
| 99 | , d = c["offsetParent"in a.fn ? "offsetParent" : "parent"](); |
| 100 | return d.length || (d = a("body")), |
| 101 | parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16 |
| 102 | }, |
| 103 | getPageHeight: function(b) { |
| 104 | return a(b).height() |
| 105 | }, |
| 106 | settings: { |
| 107 | adjustOldDeltas: !0, |
| 108 | normalizeOffset: !0 |
| 109 | } |
| 110 | }; |
| 111 | a.fn.extend({ |
| 112 | mousewheel: function(a) { |
| 113 | return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") |
| 114 | }, |
| 115 | unmousewheel: function(a) { |
| 116 | return this.unbind("mousewheel", a) |
| 117 | } |
| 118 | }) |
| 119 | }); |