Changeset 2371399
- Timestamp:
- 08/29/2020 04:40:41 AM (6 years ago)
- Location:
- ss-scroll-to-up/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (1 diff)
-
css/style.css (modified) (2 diffs)
-
js/easing.js (modified) (1 diff)
-
js/jquery.ui.totop.js (modified) (1 diff)
-
ss-sroll-up-to-top.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ss-scroll-to-up/trunk/README.txt
r1817508 r2371399 2 2 Contributors: wsaiful 3 3 Plugin Name: SS SCROLL TO UP 4 Plugin URI: http ://sobshomoy.com/plugins/ss-scroll-to-up4 Plugin URI: https://sobshomoy.com/plugins/ss-scroll-to-up 5 5 Description: This plugin will use sroll to up your pages. V.2.1 has updated the size issue in the different sreen. 6 6 Author: Saiful Islam 7 Version: 2.1. 18 Author URI: http ://sobshomoy.com/saiful/9 */ 10 Tags: page scroll up, srollup, navigate, nice scroll up .7 Version: 2.1.2 8 Author URI: https://bn.hs-bd.com/ 9 10 Tags: page scroll up, srollup, navigate, nice scroll up 11 11 Requires at least: 3.0.1 12 Tested up to: 4.9.313 Stable tag: 1.1.112 Tested up to: 5.5.0 13 Stable tag: 2.1 14 14 License: GPLv2 or later 15 15 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
ss-scroll-to-up/trunk/css/style.css
r1318548 r2371399 5 5 |-------------------------------------------------------------------------- 6 6 */ 7 8 9 7 10 8 #toTop:before { … … 65 63 } 66 64 67 68 69 70 65 #toTop:active, #toTop:focus { 71 66 outline:none; -
ss-scroll-to-up/trunk/js/easing.js
r916244 r2371399 1 /* 2 * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php 3 * 4 * Uses the built In easIng capabilities added In jQuery 1.1 5 * to offer multiple easIng options 6 * 7 * Copyright (c) 2007 George Smith 8 * Licensed under the MIT License: 9 * http://www.opensource.org/licenses/mit-license.php 10 */ 11 12 // t: current time, b: begInnIng value, c: change In value, d: duration 13 14 jQuery.extend( jQuery.easing, 15 { 16 easeInQuad: function (x, t, b, c, d) { 17 return c*(t/=d)*t + b; 18 }, 19 easeOutQuad: function (x, t, b, c, d) { 20 return -c *(t/=d)*(t-2) + b; 21 }, 22 easeInOutQuad: function (x, t, b, c, d) { 23 if ((t/=d/2) < 1) return c/2*t*t + b; 24 return -c/2 * ((--t)*(t-2) - 1) + b; 25 }, 26 easeInCubic: function (x, t, b, c, d) { 27 return c*(t/=d)*t*t + b; 28 }, 29 easeOutCubic: function (x, t, b, c, d) { 30 return c*((t=t/d-1)*t*t + 1) + b; 31 }, 32 easeInOutCubic: function (x, t, b, c, d) { 33 if ((t/=d/2) < 1) return c/2*t*t*t + b; 34 return c/2*((t-=2)*t*t + 2) + b; 35 }, 36 easeInQuart: function (x, t, b, c, d) { 37 return c*(t/=d)*t*t*t + b; 38 }, 39 easeOutQuart: function (x, t, b, c, d) { 40 return -c * ((t=t/d-1)*t*t*t - 1) + b; 41 }, 42 easeInOutQuart: function (x, t, b, c, d) { 43 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 44 return -c/2 * ((t-=2)*t*t*t - 2) + b; 45 }, 46 easeInQuint: function (x, t, b, c, d) { 47 return c*(t/=d)*t*t*t*t + b; 48 }, 49 easeOutQuint: function (x, t, b, c, d) { 50 return c*((t=t/d-1)*t*t*t*t + 1) + b; 51 }, 52 easeInOutQuint: function (x, t, b, c, d) { 53 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 54 return c/2*((t-=2)*t*t*t*t + 2) + b; 55 }, 56 easeInSine: function (x, t, b, c, d) { 57 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 58 }, 59 easeOutSine: function (x, t, b, c, d) { 60 return c * Math.sin(t/d * (Math.PI/2)) + b; 61 }, 62 easeInOutSine: function (x, t, b, c, d) { 63 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 64 }, 65 easeInExpo: function (x, t, b, c, d) { 66 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 67 }, 68 easeOutExpo: function (x, t, b, c, d) { 69 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 70 }, 71 easeInOutExpo: function (x, t, b, c, d) { 72 if (t==0) return b; 73 if (t==d) return b+c; 74 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 75 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 76 }, 77 easeInCirc: function (x, t, b, c, d) { 78 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 79 }, 80 easeOutCirc: function (x, t, b, c, d) { 81 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 82 }, 83 easeInOutCirc: function (x, t, b, c, d) { 84 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 85 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 86 }, 87 easeInElastic: function (x, t, b, c, d) { 88 var s=1.70158;var p=0;var a=c; 89 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 90 if (a < Math.abs(c)) { a=c; var s=p/4; } 91 else var s = p/(2*Math.PI) * Math.asin (c/a); 92 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 93 }, 94 easeOutElastic: function (x, t, b, c, d) { 95 var s=1.70158;var p=0;var a=c; 96 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 97 if (a < Math.abs(c)) { a=c; var s=p/4; } 98 else var s = p/(2*Math.PI) * Math.asin (c/a); 99 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 100 }, 101 easeInOutElastic: function (x, t, b, c, d) { 102 var s=1.70158;var p=0;var a=c; 103 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 104 if (a < Math.abs(c)) { a=c; var s=p/4; } 105 else var s = p/(2*Math.PI) * Math.asin (c/a); 106 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 107 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 108 }, 109 easeInBack: function (x, t, b, c, d, s) { 110 if (s == undefined) s = 1.70158; 111 return c*(t/=d)*t*((s+1)*t - s) + b; 112 }, 113 easeOutBack: function (x, t, b, c, d, s) { 114 if (s == undefined) s = 1.70158; 115 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 116 }, 117 easeInOutBack: function (x, t, b, c, d, s) { 118 if (s == undefined) s = 1.70158; 119 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 120 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 121 }, 122 easeInBounce: function (x, t, b, c, d) { 123 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 124 }, 125 easeOutBounce: function (x, t, b, c, d) { 126 if ((t/=d) < (1/2.75)) { 127 return c*(7.5625*t*t) + b; 128 } else if (t < (2/2.75)) { 129 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 130 } else if (t < (2.5/2.75)) { 131 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 132 } else { 133 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 134 } 135 }, 136 easeInOutBounce: function (x, t, b, c, d) { 137 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 138 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 139 } 140 }); 141 1 jQuery.extend(jQuery.easing,{easeInQuad:function(n,t,e,u,a){return u*(t/=a)*t+e},easeOutQuad:function(n,t,e,u,a){return-u*(t/=a)*(t-2)+e},easeInOutQuad:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t+e:-u/2*(--t*(t-2)-1)+e},easeInCubic:function(n,t,e,u,a){return u*(t/=a)*t*t+e},easeOutCubic:function(n,t,e,u,a){return u*((t=t/a-1)*t*t+1)+e},easeInOutCubic:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t*t+e:u/2*((t-=2)*t*t+2)+e},easeInQuart:function(n,t,e,u,a){return u*(t/=a)*t*t*t+e},easeOutQuart:function(n,t,e,u,a){return-u*((t=t/a-1)*t*t*t-1)+e},easeInOutQuart:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t*t*t+e:-u/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(n,t,e,u,a){return u*(t/=a)*t*t*t*t+e},easeOutQuint:function(n,t,e,u,a){return u*((t=t/a-1)*t*t*t*t+1)+e},easeInOutQuint:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t*t*t*t+e:u/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(n,t,e,u,a){return-u*Math.cos(t/a*(Math.PI/2))+u+e},easeOutSine:function(n,t,e,u,a){return u*Math.sin(t/a*(Math.PI/2))+e},easeInOutSine:function(n,t,e,u,a){return-u/2*(Math.cos(Math.PI*t/a)-1)+e},easeInExpo:function(n,t,e,u,a){return 0==t?e:u*Math.pow(2,10*(t/a-1))+e},easeOutExpo:function(n,t,e,u,a){return t==a?e+u:u*(1-Math.pow(2,-10*t/a))+e},easeInOutExpo:function(n,t,e,u,a){return 0==t?e:t==a?e+u:(t/=a/2)<1?u/2*Math.pow(2,10*(t-1))+e:u/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(n,t,e,u,a){return-u*(Math.sqrt(1-(t/=a)*t)-1)+e},easeOutCirc:function(n,t,e,u,a){return u*Math.sqrt(1-(t=t/a-1)*t)+e},easeInOutCirc:function(n,t,e,u,a){return(t/=a/2)<1?-u/2*(Math.sqrt(1-t*t)-1)+e:u/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(n,t,e,u,a){var r=1.70158,i=0,s=u;if(0==t)return e;if(1==(t/=a))return e+u;if(i||(i=.3*a),s<Math.abs(u)){s=u;r=i/4}else r=i/(2*Math.PI)*Math.asin(u/s);return-s*Math.pow(2,10*(t-=1))*Math.sin((t*a-r)*(2*Math.PI)/i)+e},easeOutElastic:function(n,t,e,u,a){var r=1.70158,i=0,s=u;if(0==t)return e;if(1==(t/=a))return e+u;if(i||(i=.3*a),s<Math.abs(u)){s=u;r=i/4}else r=i/(2*Math.PI)*Math.asin(u/s);return s*Math.pow(2,-10*t)*Math.sin((t*a-r)*(2*Math.PI)/i)+u+e},easeInOutElastic:function(n,t,e,u,a){var r=1.70158,i=0,s=u;if(0==t)return e;if(2==(t/=a/2))return e+u;if(i||(i=a*(.3*1.5)),s<Math.abs(u)){s=u;r=i/4}else r=i/(2*Math.PI)*Math.asin(u/s);return t<1?s*Math.pow(2,10*(t-=1))*Math.sin((t*a-r)*(2*Math.PI)/i)*-.5+e:s*Math.pow(2,-10*(t-=1))*Math.sin((t*a-r)*(2*Math.PI)/i)*.5+u+e},easeInBack:function(n,t,e,u,a,r){return null==r&&(r=1.70158),u*(t/=a)*t*((r+1)*t-r)+e},easeOutBack:function(n,t,e,u,a,r){return null==r&&(r=1.70158),u*((t=t/a-1)*t*((r+1)*t+r)+1)+e},easeInOutBack:function(n,t,e,u,a,r){return null==r&&(r=1.70158),(t/=a/2)<1?u/2*(t*t*((1+(r*=1.525))*t-r))+e:u/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:function(n,t,e,u,a){return u-jQuery.easing.easeOutBounce(n,a-t,0,u,a)+e},easeOutBounce:function(n,t,e,u,a){return(t/=a)<1/2.75?u*(7.5625*t*t)+e:t<2/2.75?u*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?u*(7.5625*(t-=2.25/2.75)*t+.9375)+e:u*(7.5625*(t-=2.625/2.75)*t+.984375)+e},easeInOutBounce:function(n,t,e,u,a){return t<a/2?.5*jQuery.easing.easeInBounce(n,2*t,0,u,a)+e:.5*jQuery.easing.easeOutBounce(n,2*t-a,0,u,a)+.5*u+e}}); -
ss-scroll-to-up/trunk/js/jquery.ui.totop.js
r919550 r2371399 1 /* 2 |-------------------------------------------------------------------------- 3 | UItoTop jQuery Plugin 1.2 by Matt Varone 4 | http://www.mattvarone.com/web-design/uitotop-jquery-plugin/ 5 |-------------------------------------------------------------------------- 6 */ 7 (function($){ 8 $.fn.UItoTop = function(options) { 9 10 var defaults = { 11 text: '', 12 min: 200, 13 inDelay:600, 14 outDelay:400, 15 containerID: 'toTop', 16 containerHoverID: 'toTopHover', 17 scrollSpeed: 1200, 18 easingType: 'linear' 19 }, 20 settings = $.extend(defaults, options), 21 containerIDhash = '#' + settings.containerID, 22 containerHoverIDHash = '#'+settings.containerHoverID; 23 24 $('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>'); 25 $(containerIDhash).hide().on('click.UItoTop',function(){ 26 $('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType); 27 $('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType); 28 return false; 29 }) 30 .prepend('<span id="'+settings.containerHoverID+'"></span>') 31 .hover(function() { 32 $(containerHoverIDHash, this).stop().animate({ 33 'opacity': 1 34 }, 600, 'linear'); 35 }, function() { 36 $(containerHoverIDHash, this).stop().animate({ 37 'opacity': 0 38 }, 700, 'linear'); 39 }); 40 41 $(window).scroll(function() { 42 var sd = $(window).scrollTop(); 43 if(typeof document.body.style.maxHeight === "undefined") { 44 $(containerIDhash).css({ 45 'position': 'absolute', 46 'top': sd + $(window).height() - 50 47 }); 48 } 49 if ( sd > settings.min ) 50 $(containerIDhash).fadeIn(settings.inDelay); 51 else 52 $(containerIDhash).fadeOut(settings.Outdelay); 53 }); 54 }; 55 })(jQuery); 1 !function(n){n.fn.UItoTop=function(o){var e=n.extend({text:"",min:200,inDelay:600,outDelay:400,containerID:"toTop",containerHoverID:"toTopHover",scrollSpeed:1200,easingType:"linear"},o),t="#"+e.containerID,i="#"+e.containerHoverID;n("body").append('<a href="#" id="'+e.containerID+'">'+e.text+"</a>"),n(t).hide().on("click.UItoTop",function(){return n("html, body").animate({scrollTop:0},e.scrollSpeed,e.easingType),n("#"+e.containerHoverID,this).stop().animate({opacity:0},e.inDelay,e.easingType),!1}).prepend('<span id="'+e.containerHoverID+'"></span>').hover(function(){n(i,this).stop().animate({opacity:1},600,"linear")},function(){n(i,this).stop().animate({opacity:0},700,"linear")}),n(window).scroll(function(){var o=n(window).scrollTop();void 0===document.body.style.maxHeight&&n(t).css({position:"absolute",top:o+n(window).height()-50}),o>e.min?n(t).fadeIn(e.inDelay):n(t).fadeOut(e.Outdelay)})}}(jQuery); -
ss-scroll-to-up/trunk/ss-sroll-up-to-top.php
r1638661 r2371399 17 17 18 18 // load wordpress default icons 19 add_action( 'wp_enqueue_scripts', 'jk_load_dashicons' ); 20 function jk_load_dashicons() {21 wp_enqueue_style( 'dashicons' );19 20 function ss_load_dashicons() { 21 wp_enqueue_style( 'dashicons' ); 22 22 } 23 add_action( 'wp_enqueue_scripts', 'ss_load_dashicons' ); 23 24 24 25 // load jquery and styles … … 29 30 wp_enqueue_script('ss-scrol_up-active', ss_scroll_to_up_path.'js/activate.js', array('jquery'), '1.0', true); 30 31 wp_enqueue_style('ss_style_up', ss_scroll_to_up_path.'css/style.css', array('dashicons')); 31 32 } 32 } 33 33 34 34 add_action('init', 'ss_scroll_to_up_script');
Note: See TracChangeset
for help on using the changeset viewer.