1/* 2 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 * 4 * Uses the built in easing capabilities added In jQuery 1.1 5 * to offer multiple easing options 6 * 7 * TERMS OF USE - jQuery Easing 8 * 9 * Open source under the BSD License. 10 * 11 * Copyright © 2008 George McGinley Smith 12 * All rights reserved. 13 * 14 * Redistribution and use in source and binary forms, with or without modification, 15 * are permitted provided that the following conditions are met: 16 * 17 * Redistributions of source code must retain the above copyright notice, this list of 18 * conditions and the following disclaimer. 19 * Redistributions in binary form must reproduce the above copyright notice, this list 20 * of conditions and the following disclaimer in the documentation and/or other materials 21 * provided with the distribution. 22 * 23 * Neither the name of the author nor the names of contributors may be used to endorse 24 * or promote products derived from this software without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 27 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 29 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 31 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 32 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 34 * OF THE POSSIBILITY OF SUCH DAMAGE. 35 * 36 */ 37 38// t: current time, b: begInnIng value, c: change In value, d: duration 39jQuery(document).ready(function () { 40 jQuery.easing['jswing'] = jQuery.easing['swing']; 41 jQuery.extend(jQuery.easing, { 42 def: 'easeOutQuad', 43 swing: function (e, t, n, r, i) { 44 return jQuery.easing[jQuery.easing.def](e, t, n, r, i); 45 }, 46 easeInQuad: function (e, t, n, r, i) { 47 return r * (t /= i) * t + n; 48 }, 49 easeOutQuad: function (e, t, n, r, i) { 50 return -r * (t /= i) * (t - 2) + n; 51 }, 52 easeInOutQuad: function (e, t, n, r, i) { 53 if ((t /= i / 2) < 1) return (r / 2) * t * t + n; 54 return (-r / 2) * (--t * (t - 2) - 1) + n; 55 }, 56 easeInCubic: function (e, t, n, r, i) { 57 return r * (t /= i) * t * t + n; 58 }, 59 easeOutCubic: function (e, t, n, r, i) { 60 return r * ((t = t / i - 1) * t * t + 1) + n; 61 }, 62 easeInOutCubic: function (e, t, n, r, i) { 63 if ((t /= i / 2) < 1) return (r / 2) * t * t * t + n; 64 return (r / 2) * ((t -= 2) * t * t + 2) + n; 65 }, 66 easeInQuart: function (e, t, n, r, i) { 67 return r * (t /= i) * t * t * t + n; 68 }, 69 easeOutQuart: function (e, t, n, r, i) { 70 return -r * ((t = t / i - 1) * t * t * t - 1) + n; 71 }, 72 easeInOutQuart: function (e, t, n, r, i) { 73 if ((t /= i / 2) < 1) return (r / 2) * t * t * t * t + n; 74 return (-r / 2) * ((t -= 2) * t * t * t - 2) + n; 75 }, 76 easeInQuint: function (e, t, n, r, i) { 77 return r * (t /= i) * t * t * t * t + n; 78 }, 79 easeOutQuint: function (e, t, n, r, i) { 80 return r * ((t = t / i - 1) * t * t * t * t + 1) + n; 81 }, 82 easeInOutQuint: function (e, t, n, r, i) { 83 if ((t /= i / 2) < 1) return (r / 2) * t * t * t * t * t + n; 84 return (r / 2) * ((t -= 2) * t * t * t * t + 2) + n; 85 }, 86 easeInSine: function (e, t, n, r, i) { 87 return -r * Math.cos((t / i) * (Math.PI / 2)) + r + n; 88 }, 89 easeOutSine: function (e, t, n, r, i) { 90 return r * Math.sin((t / i) * (Math.PI / 2)) + n; 91 }, 92 easeInOutSine: function (e, t, n, r, i) { 93 return (-r / 2) * (Math.cos((Math.PI * t) / i) - 1) + n; 94 }, 95 easeInExpo: function (e, t, n, r, i) { 96 return t == 0 ? n : r * Math.pow(2, 10 * (t / i - 1)) + n; 97 }, 98 easeOutExpo: function (e, t, n, r, i) { 99 return t == i ? n + r : r * (-Math.pow(2, (-10 * t) / i) + 1) + n; 100 }, 101 easeInOutExpo: function (e, t, n, r, i) { 102 if (t == 0) return n; 103 if (t == i) return n + r; 104 if ((t /= i / 2) < 1) return (r / 2) * Math.pow(2, 10 * (t - 1)) + n; 105 return (r / 2) * (-Math.pow(2, -10 * --t) + 2) + n; 106 }, 107 easeInCirc: function (e, t, n, r, i) { 108 return -r * (Math.sqrt(1 - (t /= i) * t) - 1) + n; 109 }, 110 easeOutCirc: function (e, t, n, r, i) { 111 return r * Math.sqrt(1 - (t = t / i - 1) * t) + n; 112 }, 113 easeInOutCirc: function (e, t, n, r, i) { 114 if ((t /= i / 2) < 1) return (-r / 2) * (Math.sqrt(1 - t * t) - 1) + n; 115 return (r / 2) * (Math.sqrt(1 - (t -= 2) * t) + 1) + n; 116 }, 117 easeInElastic: function (e, t, n, r, i) { 118 var s = 1.70158; 119 var o = 0; 120 var u = r; 121 if (t == 0) return n; 122 if ((t /= i) == 1) return n + r; 123 if (!o) o = i * 0.3; 124 if (u < Math.abs(r)) { 125 u = r; 126 var s = o / 4; 127 } else var s = (o / (2 * Math.PI)) * Math.asin(r / u); 128 return -(u * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t * i - s) * 2 * Math.PI) / o)) + n; 129 }, 130 easeOutElastic: function (e, t, n, r, i) { 131 var s = 1.70158; 132 var o = 0; 133 var u = r; 134 if (t == 0) return n; 135 if ((t /= i) == 1) return n + r; 136 if (!o) o = i * 0.3; 137 if (u < Math.abs(r)) { 138 u = r; 139 var s = o / 4; 140 } else var s = (o / (2 * Math.PI)) * Math.asin(r / u); 141 return u * Math.pow(2, -10 * t) * Math.sin(((t * i - s) * 2 * Math.PI) / o) + r + n; 142 }, 143 easeInOutElastic: function (e, t, n, r, i) { 144 var s = 1.70158; 145 var o = 0; 146 var u = r; 147 if (t == 0) return n; 148 if ((t /= i / 2) == 2) return n + r; 149 if (!o) o = i * 0.3 * 1.5; 150 if (u < Math.abs(r)) { 151 u = r; 152 var s = o / 4; 153 } else var s = (o / (2 * Math.PI)) * Math.asin(r / u); 154 if (t < 1) return -0.5 * u * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t * i - s) * 2 * Math.PI) / o) + n; 155 return u * Math.pow(2, -10 * (t -= 1)) * Math.sin(((t * i - s) * 2 * Math.PI) / o) * 0.5 + r + n; 156 }, 157 easeInBack: function (e, t, n, r, i, s) { 158 if (s == undefined) s = 1.70158; 159 return r * (t /= i) * t * ((s + 1) * t - s) + n; 160 }, 161 easeOutBack: function (e, t, n, r, i, s) { 162 if (s == undefined) s = 1.70158;
163 return r * ((t = t / i - 1) * t * ((s + 1) * t + s) + 1) + n; 164 }, 165 easeInOutBack: function (e, t, n, r, i, s) { 166 if (s == undefined) s = 1.70158; 167 if ((t /= i / 2) < 1) return (r / 2) * t * t * (((s *= 1.525) + 1) * t - s) + n; 168 return (r / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + n; 169 }, 170 easeInBounce: function (e, t, n, r, i) { 171 return r - jQuery.easing.easeOutBounce(e, i - t, 0, r, i) + n; 172 }, 173 easeOutBounce: function (e, t, n, r, i) { 174 if ((t /= i) < 1 / 2.75) { 175 return r * 7.5625 * t * t + n; 176 } else if (t < 2 / 2.75) { 177 return r * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + n; 178 } else if (t < 2.5 / 2.75) { 179 return r * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + n; 180 } else { 181 return r * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + n; 182 } 183 }, 184 easeInOutBounce: function (e, t, n, r, i) { 185 if (t < i / 2) return jQuery.easing.easeInBounce(e, t * 2, 0, r, i) * 0.5 + n; 186 return jQuery.easing.easeOutBounce(e, t * 2 - i, 0, r, i) * 0.5 + r * 0.5 + n; 187 }, 188 }); 189});
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.