jquery.scrollTo-2.1.2/0000755000000000000000000000000012601033532013324 5ustar rootrootjquery.scrollTo-2.1.2/tests/0000755000000000000000000000000012601033532014466 5ustar rootrootjquery.scrollTo-2.1.2/tests/test.js0000644000000000000000000000067112601033532016007 0ustar rootroot$.fn.test = function(){ // Hide title on iframes if (window.self !== window.top) { $('h1').hide(); } if (location.search === '?notest') { return this; } $.scrollTo.defaults.axis = 'xy'; var root = this.is('iframe') ? this.contents() : $('body'); root.find('#ua').html( navigator.userAgent + '
' + 'document.compatMode is "' + document.compatMode + '"' ); return this.scrollTo('max', 1000).scrollTo(0, 1000); }; jquery.scrollTo-2.1.2/tests/index.html0000644000000000000000000000263112601033532016465 0ustar rootroot jQuery.scrollTo Tests

jQuery.scrollTo Tests

jquery.scrollTo-2.1.2/tests/WinMaxY-with-iframe-quirks.html0000644000000000000000000000045412601033532022441 0ustar rootroot jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode

jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode

jquery.scrollTo-2.1.2/tests/WinMaxY-to-iframe-compat.html0000644000000000000000000000145612601033532022060 0ustar rootroot jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode

jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode

jquery.scrollTo-2.1.2/tests/WinMaxY-quirks.html0000644000000000000000000000115712601033532020230 0ustar rootroot jQuery.scrollTo - Test Window MaxY - Quirks Mode

jQuery.scrollTo - Test Window MaxY - Quirks Mode

 
jquery.scrollTo-2.1.2/tests/WinMaxY-compat.html0000644000000000000000000000141712601033532020174 0ustar rootroot jQuery.scrollTo - Test Window MaxY - Compat Mode

jQuery.scrollTo - Test Window MaxY - Compat Mode

 
jquery.scrollTo-2.1.2/tests/ElemMaxY-quirks.html0000644000000000000000000000130712601033532020352 0ustar rootroot jQuery.scrollTo - Test Element MaxY - Quirks Mode

jQuery.scrollTo - Test Element MaxY - Quirks Mode

 
jquery.scrollTo-2.1.2/tests/ElemMaxY-compat.html0000644000000000000000000000154612601033532020324 0ustar rootroot jQuery.scrollTo - Test Element MaxY - Compat Mode

jQuery.scrollTo - Test Element MaxY - Compat Mode

 
jquery.scrollTo-2.1.2/package.json0000644000000000000000000000164112601033532015614 0ustar rootroot{ "name": "jquery.scrollto", "version": "2.1.2", "description": "Lightweight, cross-browser and highly customizable animated scrolling with jQuery", "main": "jquery.scrollTo.js", "license": "MIT", "ignore": ["**/.*","demo","tests","CHANGELOG","README.md","composer.json","bower.json"], "dependencies": { "jquery": ">=1.8" }, "homepage": "https://github.com/flesler/jquery.scrollTo/", "docs": "https://github.com/flesler/jquery.scrollTo/", "demo": "http://demos.flesler.com/jquery/scrollTo/", "bugs": "https://github.com/flesler/jquery.scrollTo/issues", "download": "https://github.com/flesler/jquery.scrollTo/releases", "repository": "git://github.com/flesler/jquery.scrollTo", "keywords": ["browser","animated","animation","scrolling","scroll","links","anchors","jquery","jquery-plugin", "ecosystem:jquery"], "author": { "name": "Ariel Flesler", "web": "http://flesler.blogspot.com/" } } jquery.scrollTo-2.1.2/jquery.scrollTo.js0000644000000000000000000001313612601033532017005 0ustar rootroot/*! * jQuery.scrollTo * Copyright (c) 2007-2015 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com * Licensed under MIT * http://flesler.blogspot.com/2007/10/jqueryscrollto.html * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery * @author Ariel Flesler * @version 2.1.2 */ ;(function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // AMD define(['jquery'], factory); } else if (typeof module !== 'undefined' && module.exports) { // CommonJS module.exports = factory(require('jquery')); } else { // Global factory(jQuery); } })(function($) { 'use strict'; var $scrollTo = $.scrollTo = function(target, duration, settings) { return $(window).scrollTo(target, duration, settings); }; $scrollTo.defaults = { axis:'xy', duration: 0, limit:true }; function isWin(elem) { return !elem.nodeName || $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1; } $.fn.scrollTo = function(target, duration, settings) { if (typeof duration === 'object') { settings = duration; duration = 0; } if (typeof settings === 'function') { settings = { onAfter:settings }; } if (target === 'max') { target = 9e9; } settings = $.extend({}, $scrollTo.defaults, settings); // Speed is still recognized for backwards compatibility duration = duration || settings.duration; // Make sure the settings are given right var queue = settings.queue && settings.axis.length > 1; if (queue) { // Let's keep the overall duration duration /= 2; } settings.offset = both(settings.offset); settings.over = both(settings.over); return this.each(function() { // Null target yields nothing, just like jQuery does if (target === null) return; var win = isWin(this), elem = win ? this.contentWindow || window : this, $elem = $(elem), targ = target, attr = {}, toff; switch (typeof targ) { // A number will pass the regex case 'number': case 'string': if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { targ = both(targ); // We are done break; } // Relative/Absolute selector targ = win ? $(targ) : $(targ, elem); /* falls through */ case 'object': if (targ.length === 0) return; // DOMElement / jQuery if (targ.is || targ.style) { // Get the real position of the target toff = (targ = $(targ)).offset(); } } var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; $.each(settings.axis.split(''), function(i, axis) { var Pos = axis === 'x' ? 'Left' : 'Top', pos = Pos.toLowerCase(), key = 'scroll' + Pos, prev = $elem[key](), max = $scrollTo.max(elem, axis); if (toff) {// jQuery / DOMElement attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]); // If it's a dom element, reduce the margin if (settings.margin) { attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0; attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0; } attr[key] += offset[pos] || 0; if (settings.over[pos]) { // Scroll to a fraction of its width/height attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos]; } } else { var val = targ[pos]; // Handle percentage values attr[key] = val.slice && val.slice(-1) === '%' ? parseFloat(val) / 100 * max : val; } // Number or 'number' if (settings.limit && /^\d+$/.test(attr[key])) { // Check the limits attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max); } // Don't waste time animating, if there's no need. if (!i && settings.axis.length > 1) { if (prev === attr[key]) { // No animation needed attr = {}; } else if (queue) { // Intermediate animation animate(settings.onAfterFirst); // Don't animate this axis again in the next iteration. attr = {}; } } }); animate(settings.onAfter); function animate(callback) { var opts = $.extend({}, settings, { // The queue setting conflicts with animate() // Force it to always be true queue: true, duration: duration, complete: callback && function() { callback.call(elem, targ, settings); } }); $elem.animate(attr, opts); } }); }; // Max scrolling position, works on quirks mode // It only fails (not too badly) on IE, quirks mode. $scrollTo.max = function(elem, axis) { var Dim = axis === 'x' ? 'Width' : 'Height', scroll = 'scroll'+Dim; if (!isWin(elem)) return elem[scroll] - $(elem)[Dim.toLowerCase()](); var size = 'client' + Dim, doc = elem.ownerDocument || elem.document, html = doc.documentElement, body = doc.body; return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]); }; function both(val) { return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val }; } // Add special hooks so that window scroll properties can be animated $.Tween.propHooks.scrollLeft = $.Tween.propHooks.scrollTop = { get: function(t) { return $(t.elem)[t.prop](); }, set: function(t) { var curr = this.get(t); // If interrupt is true and user scrolled, stop animating if (t.options.interrupt && t._last && t._last !== curr) { return $(t.elem).stop(); } var next = Math.round(t.now); // Don't waste CPU // Browsers don't render floating point scroll if (curr !== next) { $(t.elem)[t.prop](next); t._last = this.get(t); } } }; // AMD requirement return $scrollTo; }); jquery.scrollTo-2.1.2/demo/0000755000000000000000000000000012601033532014250 5ustar rootrootjquery.scrollTo-2.1.2/demo/index.old.html0000644000000000000000000002034312601033532017024 0ustar rootroot jQuery.ScrollTo

jQuery.ScrollTo by Ariel Flesler



jquery.scrollTo-2.1.2/demo/index.html0000644000000000000000000004425412601033532016256 0ustar rootroot jQuery.scrollTo

jQuery.scrollTo by Ariel Flesler

Table of contents (try these)

Ways to specify the target Click an option, to see it in action

Settings The examples shown here, are summarized for brevity

Settings inherited from $().animate()

jquery.scrollTo-2.1.2/demo/css/0000755000000000000000000000000012601033532015040 5ustar rootrootjquery.scrollTo-2.1.2/demo/css/style.old.css0000644000000000000000000000144012601033532017466 0ustar rootrootbody{ background-color: #DDD; } .container li,div.pane{ height:200px; font-weight:bolder; position:relative; } ul{ list-style:none; padding:0; margin:0; } .container a{ color:black; position:absolute; bottom:10px; } p{ margin:0; } .container{ border:1px black solid; margin:30px; overflow:auto; position:relative; width:80%; height:300px; } .container ul{ padding:0; } #x{ height:217px; } #x li,#xy li{ width:300px; float:left; } h1{ color:#5B739C; } h1 strong{ font-size:13px; color:#777; } #links{ border:1px solid black; width:210px; padding:10px; float:right; margin-top:-55px; background-color:white; } #links h3{ color:#933; margin:5px; } #links ul{ padding: 8px 0 3px 20px; } #links li{ list-style-type:circle; } #links a{ color:#69C; }jquery.scrollTo-2.1.2/demo/css/style.css0000644000000000000000000000375312601033532016722 0ustar rootrootbody{ padding:5px; height:1600px; font-family: Verdana, sans-serif; background-color: #DDD; } ul,li,h1,h2,h3,h4,p{ list-style:none; padding:0; margin:0; } .part{ border:1px solid black; background-color:white; } .part h3, .part h4, .part h4 a { color:#933; } #toc{ display:block; padding:10px; position:relative; margin:15px 0; float:left; width:305px; } #toc h3{ padding-bottom:10px; } #toc h3 strong{ font-size:13px; color:black; } #links{ border:1px solid black; width:210px; padding:10px; float:right; margin-top:-30px; } #links h3{ color:#933; } #links ul{ padding: 8px 0 3px 20px; } #links li{ list-style-type:circle; } #links a{ color:#69C; } #toc li, #links li{ list-style-type:circle; padding-left:5px; margin-left:15px; } #toc a{ color:#69C; } .section{ border:1px black solid; width:950px; padding:10px; margin: 5px 0; position:relative; clear:both; } .section h3{ margin-bottom:10px; margin-left: 8px; } .section h4{ margin:10px 0 10px 8px; } .section li{ float:left; } .pane{ overflow:auto; clear:left; margin: 10px 0 0 10px; position:relative; width:826px; height:322px; } ul.elements{ background-color:#5B739C; } ul.elements li{ width:200px; height:100px; font-weight:bolder; border:1px black solid; text-align:center; padding:50px; position:relative; background-color:#DDD; } ul.elements li a{ bottom:20px; color:#933; font-size:12px; left:125px; position:absolute; } ul.elements li p{ color:#666; } #pane-settings ul.elements li{ margin:5px; } #pane-settings{ margin-bottom:10px; } ul.links{ height:20px; overflow:hidden; padding-left: 5px; } ul.links a{ color:#69C; margin:0 0 0 5px; } .clear{ clear:left; } h3 span{ position:absolute; } .message{ background:#EEE; border:1px solid #999; color:#333; font-size:12px; font-weight:normal; padding:1px; margin-top:2px; } h1{ color:#5B739C; } h1 strong{ font-size:13px; color:#777; }jquery.scrollTo-2.1.2/composer.json0000644000000000000000000000160012601033532016043 0ustar rootroot{ "name": "flesler/jquery.scrollto", "description": "Lightweight, cross-browser and highly customizable animated scrolling with jQuery", "keywords": [ "browser", "animated", "animation", "jquery", "scrolling", "scroll", "links", "anchors" ], "homepage": "https://github.com/flesler/jquery.scrollTo", "support": { "issues": "https://github.com/flesler/jquery.scrollTo/issues", "source": "https://github.com/flesler/jquery.scrollTo" }, "authors": [ { "name": "Ariel Flesler", "web": "http://flesler.blogspot.com/" } ], "require": { "components/jquery": ">=1.8" }, "extra": { "component": { "scripts": [ "jquery.scrollTo.js" ], "files": [ "jquery.scrollTo.min.js" ] } } }jquery.scrollTo-2.1.2/bower.json0000644000000000000000000000115712601033532015341 0ustar rootroot{ "name": "jquery.scrollTo", "description": "Lightweight, cross-browser and highly customizable animated scrolling with jQuery", "homepage": "https://github.com/flesler/jquery.scrollTo", "main": [ "./jquery.scrollTo.js" ], "ignore": [ "**/.*", "demo", "tests", "CHANGELOG", "README.md", "composer.json", "package.json" ], "dependencies": { "jquery": ">=1.8" }, "keywords": [ "browser", "animated", "animation", "jquery", "scrolling", "scroll", "links", "anchors" ], "author": { "name": "Ariel Flesler", "web": "http://flesler.blogspot.com/" } } jquery.scrollTo-2.1.2/README.md0000644000000000000000000001475012601033532014612 0ustar rootroot# jQuery.scrollTo Lightweight, cross-browser and highly customizable animated scrolling with jQuery [![GitHub version](https://badge.fury.io/gh/flesler%2Fjquery.scrollTo.svg)](http://badge.fury.io/gh/flesler%2Fjquery.scrollTo) [![libscore](http://img.shields.io/badge/libscore-31656-brightgreen.svg?style=flat-square)](http://libscore.com/#jQuery.fn.scrollTo) ## Installation The plugin requires jQuery 1.8 or higher. Via [bower](https://github.com/flesler/jquery.scrollTo/blob/master/bower.json): ```bash bower install jquery.scrollTo ``` Via [npm](https://www.npmjs.com/package/jquery.scrollto): ```bash npm install jquery.scrollto ``` Via [packagist](https://packagist.org/packages/flesler/jquery.scrollTo): ```php php composer.phar require --prefer-dist flesler/jquery.scrollto "*" ``` ### Using a public CDN CDN provided by [jsdelivr](http://www.jsdelivr.com/#!jquery.scrollto) ```html ``` CDN provided by [cdnjs](https://cdnjs.com/libraries/jquery-scrollTo) ```html ``` ### Downloading Manually If you want the latest stable version, get the latest release from the [releases page](https://github.com/flesler/jquery.scrollTo/releases). ## 2.0 Version 2.0 has been recently released. It is mostly backwards compatible, if you have any issue first check [this link](https://github.com/flesler/jquery.scrollTo/wiki/Migrating-to-2.0). If your problem is not solved then go ahead and [report the issue](https://github.com/flesler/jquery.scrollTo/issues/new). ## Usage jQuery.scrollTo's signature is designed to resemble [$().animate()](http://api.jquery.com/animate/). ```js $(element).scrollTo(target[,duration][,settings]); ``` ### _element_ This must be a scrollable element, to scroll the whole window use `$(window)`. ### _target_ This defines the position to where `element` must be scrolled. The plugin supports all these formats: * A number with a fixed position: `250` * A string with a fixed position with px: `"250px"` * A string with a percentage (of container's size): `"50%"` * A string with a relative step: `"+=50px"` * An object with `left` and `top` containining any of the aforementioned: `{left:250, top:"50px"}` * The string `"max"` to scroll to the end. * A string selector that will be relative to the element to scroll: `".section:eq(2)"` * A DOM element, probably a child of the element to scroll: `document.getElementById("top")` * A jQuery object with a DOM element: `$("#top")` ### _settings_ The `duration` parameter is a shortcut to the setting with the same name. These are the supported settings: * __axis__: The axes to animate: `xy` (default), `x`, `y`, `yx` * __interrupt__: If `true` will cancel the animation if the user scrolls. Default is `false` * __limit__: If `true` the plugin will not scroll beyond the container's size. Default is `true` * __margin__: If `true`, subtracts the margin and border of the `target` element. Default is `false` * __offset__: Added to the final position, can be a number or an object with `left` and `top` * __over__: Adds a % of the `target` dimensions: `{left:0.5, top:0.5}` * __queue__: If `true` will scroll one `axis` and then the other. Default is `false` * __onAfter(target, settings)__: A callback triggered when the animation ends (jQuery's `complete()`) * __onAfterFirst(target, settings)__: A callback triggered after the first axis scrolls when queueing You can add any setting supported by [$().animate()](http://api.jquery.com/animate/#animate-properties-options) as well: * __duration__: Duration of the animation, default is `0` which makes it instantaneous * __easing__: Name of an easing equation, you must register the easing function: `swing` * __fail()__: A callback triggered when the animation is stopped (f.e via `interrupt`) * __step()__: A callback triggered for every animated property on every frame * __progress()__: A callback triggered on every frame * And more, check jQuery's [documentation](http://api.jquery.com/animate/#animate-properties-options) ### window shorthand You can use `$.scrollTo(...)` as a shorthand for `$(window).scrollTo(...)`. ### Changing the default settings As with most plugins, the default settings are exposed so they can be changed. ```js $.extend($.scrollTo.defaults, { axis: 'y', duration: 800 }); ``` ### Stopping the animation jQuery.scrollTo ends up creating ordinary animations which can be stopped by calling [$().stop()](http://api.jquery.com/stop/) or [$().finish()](http://api.jquery.com/finish/) on the same element you called `$().scrollTo()`, including the `window`. Remember you can pass a `fail()` callback to be called when the animation is stopped. ## Demo Check the [demo](http://demos.flesler.com/jquery/scrollTo/) to see every option in action. ## Complementary plugins There are two plugins, also created by me that depend on jQuery.scrollTo and aim to simplify certain use cases. ### [jQuery.localScroll](https://github.com/flesler/jquery.localScroll) This plugin makes it very easy to implement anchor navigation. If you don't want to include another plugin, you can try using something like [this minimalistic gist](https://gist.github.com/flesler/3f3e1166690108abf747). ### [jQuery.serialScroll](https://github.com/flesler/jquery.serialScroll) This plugin simplifies the creation of scrolling slideshows. ## License (The MIT License) Copyright (c) 2007-2015 Ariel Flesler Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jquery.scrollTo-2.1.2/LICENSE0000644000000000000000000000211512601033532014330 0ustar rootroot(The MIT License) Copyright (c) 2007-2015 Ariel Flesler Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.jquery.scrollTo-2.1.2/CHANGELOG.md0000644000000000000000000001363012601033532015140 0ustar rootroot# Changelog ## 2.1.2 ### Fix - Plugin won't break if an empty jQuery object is passed, it's now consistent with selector target #121 ### Docs - Converted the CHANGELOG to Markdown ## 2.1.1 ### Fix - Slight change so define function is not minified (#91) ## 2.1.0 ### Enhancement - Avoid animating a needless axis ### Feature - Implemented interrupt setting, if true will stop animating on user (manual) scroll (#67) ## 2.0.1 ### Fix - Fixed "queue" setting conflicts with $().animate(), forced to always get there as true ## 2.0.0 ### Feature - All settings are passed to jQuery.animate() meaning it now supports even more settings ### Enhancement - $(window)._scrollable() is no longer needed, the element is always the window - Delegating to jQuery the get/set of element/window scroll positions. ### Compat - Dropped support for $.scrollTo.window() and $(window)._scrollable() ### Fix - Now works consistenly on Chrome 40 - Now works correctly on Windows Phone - Now works correctly on Android Browsers - Now works correctly on iOS Browsers ## 1.4.14 ###Misc - Internal both() function will handle nulls correctly ## 1.4.13 ###Misc - Support for CommonJS / NPM added by durango ## 1.4.12 ### Fix - Fixed selector matching body fails on window scrolling ## 1.4.11 ###Misc ##- Reverted changes from 1.4.10 ## 1.4.10 ### Enhancement - Giving the plugin an AMD module id so it can be required (f.e by localScroll) ## 1.4.9 ### Enhancement - "offset" setting can now be a function as well (#60) ## 1.4.8 ### Enhancement - Added support for AMD ## 1.4.7 ###Misc - Changed spacing - Changed licensing to MIT - Repo is compliant with official jquery plugins repository ## 1.4.6 ### Fix - Fixed first argument of onAfter and onAfterFirst was original target and should be "parsed" target ## 1.4.5 ### Fix - Fixed passing a negative scroll value crashes ## 1.4.4 ###Change ##- Re-released as 1.4.4 to avoid issues with bower ## 1.4.3.1 ### Fix ##- Fixed $.scrollTo(0) broken on 1.4.3 ## 1.4.3 ### Enhancement - Limit calculations can be disabled by setting the option 'limit' to false. - Null target or unmatching selector don't break and fail silently ###Misc - Removed support for the deprecated setting 'speed' ### Fix ##- Removed $.browser.webkit so the plugin works with jQuery +1.8 ## 1.4.2 ### Feature - The plugin support percentages as target ('50%' or {top:'50%', left:'45%'}) - Exposed the max() calculation as $.scrollTo.max ### Enhancement - Renamed $.fn.scrollable to $.fn._scrollable to avoid conflicts with other plugins ### Fix - Fixing max calculations for regular DOM elements ## 1.4.1 ### Feature - The target can be 'max' to scroll to the end while keeping it elegant. ### Enhancement ##- Default duration is 0 for jquery +1.3. Means sync animation - The plugin works on all major browsers, on compat & quirks modes, including iframes. - In addition to window/document, if html or body are received, the plugin will choose the right one. ### Fix - The plugin accepts floating numbers, Thanks Ramin - Using jQuery.nodeName where neccessary so that this works on xml+xhtml - The max() internal function wasn't completely accurrate, now it is 98% (except for IE on quirks mode and it's not too noticeable). ## 1.4 ### Fix - Fixed the problem when scrolling the window to absolute positioned elements on Safari. - Fixed the problem on Opera 9.5 when scrolling the window. That it always scrolls to 0. ### Feature - Added the settings object as 2nd argument to the onAfter callback. - The 3rd argument of scrollTo can be just a function and it's used as the onAfter. - Added full support for iframes (even max scroll calculation). - Instead of $.scrollTo, $(window).scrollTo() and $(document).scrollTo() can be used. - Added $().scrollable() that returns the real element to scroll, f.e: $(window).scrollable() == ###body|html], works for iframes ### Enhancement - Cleaned the code a bit, specially the comments ## 1.3.3 ###Change - Changed the licensing from GPL to GPL+MIT. ## 1.3.2 ### Enhancement - Small improvements to make the code shorter. ###Change - Removed the last argument received by onAfter as it was the same as the 'this' but jqueryfied. ## 1.3.1 ### Feature - Exposed $.scrollTo.window() to get the element that needs to be animated, to scroll the window. - Added option 'over'. ### Enhancement - Made the code as short as possible. ###Change - Changed the arguments received by onAfter ## 1.3 ### Enhancement - Added semicolon to the start, for safe file concatenation - Added a limit check, values below 0 or over the maximum are fixed. - Now it should work faster, only one of html or body go through all the processing, instead of both for all browsers. ### Fix - Fixed the behavior for Opera, which seemed to react to both changes on and . - The border is also reduced, when 'margin' is set to true. ###Change - The option speed has been renamed to duration. ### Feature - The duration can be specified with a number as 2nd argument, and the rest of the settings as the third ( like $().animate ) - Remade the demo #### 1.2.4 ### Enhancement - The target can be in the form of { top:x, left:y } allowing different position for each axis. ### Feature - The option 'offset' has been added, to scroll behind or past the target. Can be a number(both axes) or { top:x, left:y }. #### 1.2.3 ### Feature - Exposed the defaults. ### Enhancement - Made the callback functions receive more parameters. #### 1.2.2 ### Fix - Fixed a bug, I didn't have to add the scrolled amount if it was body or html. ## 1.2 ###Change - The option 'onafter' is now called 'onAfter'. ### Feature - Two axes can be scrolled together, this is set with the option 'axis'. - In case 2 axes are chosen, the scrolling can be queued: one scrolls, and then the other. - There's an intermediary event, 'onAfterFirst' called in case the axes are queued, after the first ends. - If the option 'margin' is set to true, the plugin will take in account, the margin of the target(no use if target is a value).jquery.scrollTo-2.1.2/.jshintrc0000644000000000000000000000056712601033532015161 0ustar rootroot{ "shadow": "inner", "camelcase": true, "eqeqeq": true, "eqnull": true, "freeze": true, "funcscope": true, "newcap": true, "noarg": true, "noempty": true, "nonbsp": true, "unused": true, "undef": true, "scripturl": true, "strict": true, "quotmark": "single", "globals": {"define": true}, "browser": true, "node": true, "jquery": true }jquery.scrollTo-2.1.2/.jscsrc0000644000000000000000000000272012601033532014615 0ustar rootroot{ "requireCurlyBraces": [ "do","else","for","switch", "try","catch","while" ], "requireSpaceBeforeKeywords": [ "else", "catch" ], "requireSpaceAfterKeywords": [ "do", "for", "if", "else", "switch", "case", "try", "catch", "void", "while", "with", "return", "typeof" ], "requireSpaceBeforeBlockStatements": true, "requireParenthesesAroundIIFE": true, "requireSpacesInFunctionExpression": {"beforeOpeningCurlyBrace": true}, "disallowSpacesInFunctionExpression": {"beforeOpeningRoundBrace": true}, "disallowSpacesInCallExpression": true, "requireBlocksOnNewline": 1, "disallowPaddingNewlinesInBlocks": true, "disallowEmptyBlocks": true, "disallowQuotedKeysInObjects": "allButReserved", "disallowSpaceAfterObjectKeys": true, "requireCommaBeforeLineBreak": true, "requireOperatorBeforeLineBreak": true, "disallowSpaceAfterPrefixUnaryOperators": true, "disallowSpaceBeforePostfixUnaryOperators": true, "disallowKeywords": [ "with" ], "disallowMultipleLineBreaks": true, "disallowMixedSpacesAndTabs": "smart", "disallowOperatorBeforeLineBreak": ["."], "disallowTrailingWhitespace": true, "disallowTrailingComma": true, "disallowKeywordsOnNewLine": ["else"], "requireCapitalizedConstructors": true, "requireDotNotation": true, "disallowYodaConditions": true, "disallowNewlineBeforeBlockStatements": true, "validateLineBreaks": "LF", "validateQuoteMarks": { "mark": "'", "escape": true }, "validateIndentation": "\t", "validateParameterSeparator": ", " }jquery.scrollTo-2.1.2/.gitignore0000644000000000000000000000015312601033532015313 0ustar rootrootlib-cov *.seed *.log *.csv *.dat *.out *.pid *.gz pids logs results node_modules npm-debug.log .DS_Store