MouseWheel Smooth Scroll - Version 1.4

Version Description

  • minify JS scripts and combine them into one file
Download this release

Release Info

Developer kubiq
Plugin Icon 128x128 MouseWheel Smooth Scroll
Version 1.4
Comparing to
See all releases

Code changes from version 1.3 to 1.4

js/jQuery.scrollSpeed.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Custom scrolling speed with jQuery
2
+ // Source: github.com/ByNathan/jQuery.scrollSpeed
3
+ // Version: 1.0.2
4
+
5
+ (function($) {
6
+
7
+ jQuery.scrollSpeed = function(step, speed, easing) {
8
+
9
+ var $document = $(document),
10
+ $window = $(window),
11
+ $body = $('html, body'),
12
+ option = easing || 'default',
13
+ root = 0,
14
+ scroll = false,
15
+ scrollY,
16
+ scrollX,
17
+ view;
18
+
19
+ if (window.navigator.msPointerEnabled)
20
+
21
+ return false;
22
+
23
+ $window.on('mousewheel DOMMouseScroll', function(e) {
24
+
25
+ if( ! e.ctrlKey ){
26
+ var deltaY = e.originalEvent.wheelDeltaY,
27
+ detail = e.originalEvent.detail;
28
+ scrollY = $document.height() > $window.height();
29
+ scrollX = $document.width() > $window.width();
30
+ scroll = true;
31
+
32
+ if (scrollY) {
33
+
34
+ view = $window.height();
35
+
36
+ if (deltaY < 0 || detail > 0)
37
+
38
+ root = (root + view) >= $document.height() ? root : root += step;
39
+
40
+ if (deltaY > 0 || detail < 0)
41
+
42
+ root = root <= 0 ? 0 : root -= step;
43
+
44
+ $body.stop().animate({
45
+
46
+ scrollTop: root
47
+
48
+ }, speed, option, function() {
49
+
50
+ scroll = false;
51
+
52
+ });
53
+ }
54
+
55
+ if (scrollX) {
56
+
57
+ view = $window.width();
58
+
59
+ if (deltaY < 0 || detail > 0)
60
+
61
+ root = (root + view) >= $document.width() ? root : root += step;
62
+
63
+ if (deltaY > 0 || detail < 0)
64
+
65
+ root = root <= 0 ? 0 : root -= step;
66
+
67
+ $body.stop().animate({
68
+
69
+ scrollLeft: root
70
+
71
+ }, speed, option, function() {
72
+
73
+ scroll = false;
74
+
75
+ });
76
+ }
77
+
78
+ return false;
79
+ }
80
+
81
+
82
+ }).on('scroll', function() {
83
+
84
+ if (scrollY && !scroll) root = $window.scrollTop();
85
+ if (scrollX && !scroll) root = $window.scrollLeft();
86
+
87
+ }).on('resize', function() {
88
+
89
+ if (scrollY && !scroll) view = $window.height();
90
+ if (scrollX && !scroll) view = $window.width();
91
+
92
+ });
93
+ };
94
+
95
+ jQuery.easing.default = function (x,t,b,c,d) {
96
+
97
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
98
+ };
99
+
100
+ })(jQuery);
js/jquery.easing.min.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Easing v1.3.2 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ * Open source under the BSD License.
4
+ * Copyright © 2008 George McGinley Smith
5
+ * All rights reserved.
6
+ * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE
7
+ */
8
+ (function(h){h.easing.jswing=h.easing.swing;h.extend(h.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return h.easing[h.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a+c:-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){return 1>
9
+ (a/=d/2)?b/2*a*a*a+c:b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a+c:-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a*a+c:b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,
10
+ c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return 0==a?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){return 0==a?c:a==d?c+b:1>(a/=d/2)?b/2*Math.pow(2,10*(a-1))+c:b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*
11
+ (Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){return 1>(a/=d/2)?-b/2*(Math.sqrt(1-a*a)-1)+c:b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==a)return c;if(1==(a/=d))return c+b;f||(f=.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==
12
+ a)return c;if(1==(a/=d))return c+b;f||(f=.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin(2*(a*d-e)*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==a)return c;if(2==(a/=d/2))return c+b;f||(f=.3*d*1.5);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return 1>a?-.5*g*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/f)+c:g*Math.pow(2,-10*--a)*Math.sin(2*(a*d-e)*Math.PI/f)*.5+b+c},easeInBack:function(e,a,c,b,d,f){void 0==
13
+ f&&(f=1.70158);return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return 1>(a/=d/2)?b/2*a*a*(((f*=1.525)+1)*a-f)+c:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-h.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?7.5625*b*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+.75)+c:a<2.5/2.75?b*(7.5625*
14
+ (a-=2.25/2.75)*a+.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+.984375)+c},easeInOutBounce:function(e,a,c,b,d){return a<d/2?.5*h.easing.easeInBounce(e,2*a,0,b,d)+c:.5*h.easing.easeOutBounce(e,2*a-d,0,b,d)+.5*b+c}})})(jQuery);
mousewheel-smooth-scroll.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MouseWheel Smooth Scroll
4
  Plugin URI: http://kubiq.sk
5
  Description: MouseWheel smooth scrolling for your WordPress website
6
- Version: 1.3
7
  Author: Jakub Novák
8
  Author URI: http://kubiq.sk
9
  */
3
  Plugin Name: MouseWheel Smooth Scroll
4
  Plugin URI: http://kubiq.sk
5
  Description: MouseWheel smooth scrolling for your WordPress website
6
+ Version: 1.4
7
  Author: Jakub Novák
8
  Author URI: http://kubiq.sk
9
  */
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://kubiq.sk
4
  Tags: smooth scroll, mousewheel scroll, scrolling
5
  Requires at least: 3.0.1
6
  Tested up to: 4.4
7
- Stable tag: 1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,4 +59,7 @@ Replace basic scrolling "effect" on Windows, Linux and some browsers with nice s
59
 
60
  = 1.3 =
61
  * Added PHP header to hybrid PHP/JS file
62
- * Scroll library improvements
 
 
 
4
  Tags: smooth scroll, mousewheel scroll, scrolling
5
  Requires at least: 3.0.1
6
  Tested up to: 4.4
7
+ Stable tag: 1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  = 1.3 =
61
  * Added PHP header to hybrid PHP/JS file
62
+ * Scroll library improvements
63
+
64
+ = 1.4 =
65
+ * minify JS scripts and combine them into one file