PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2007-2014 Ariel Flesler <aflesler@gmail.com>
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.

View File

@ -0,0 +1,67 @@
# jQuery.ScrollTo
### Installation and usage
Using [bower](https://github.com/twitter/bower):
```bash
bower install jquery.scrollTo
```
Using [npm](https://www.npmjs.org/package/jquery.scrollto):
```bash
npm install jquery.scrollto
```
Using [composer](http://getcomposer.org/download/):
Either run
```
php composer.phar require --prefer-dist flesler/jquery.scrollto "*"
```
or add
```
"flesler/jquery.scrollto": "*"
```
to the require section of your composer.json.
### Downloading Manually
If you want the latest stable version, get the latest release from the [releases page](https://github.com/flesler/jquery.scrollTo/releases).
### Notes
* Apart from the target and duration, the plugin can receive a hash of settings. Documentation and examples are included in the source file.
* If you are interested in animated "same-page-scrolling" using anchors(href="#some_id"), check http://github.com/flesler/jquery.localScroll
* For a slideshow-like behavior using scrolling, check http://github.com/flesler/jquery.serialScroll
* The target can be specified as:
* A Number/String specifying a position using px or just the number.
* A string selector that will be relative, to the element that is going to be scrolled, and must match at least one child.
* A DOM element, logically child of the element to scroll.
* A hash { top:x, left:y }, x and y can be any kind of number/string like described above.
* The plugin supports relative animations
* 'em' and '%' are not supported as part of the target, because they won't work with jQuery.fn.animate.
* The plugin might fail to scroll an element, to an inner node that is nested in more scrollable elements. This seems like an odd situation anyway.
* Both axes ( x, y -> left, top ) can be scrolled, you can send 'x', 'y', 'xy' or 'yx' as 'axis' inside the settings.
* If 2 axis are scrolled, there's an option to queue the animations, so that the second will start once the first ended ('xy' and 'yx' will have different effects)
* The option 'margin' can be set to true, then the margin of the target element, will be taken into account and will be deducted.
* 'margin' will only be valid, if the target is a selector, a DOM element, or a jQuery Object.
* The option 'offset' allows to scroll less or more than the actual target by a defined amount of pixels. Can be a number(both axes), { top:x, left:y } or a function that returns an object with top & left.
* The option 'over' lets you add or deduct a fraction of the element's height and width from the final position. so over:0.5 will scroll to the middle of the object. can be specified with {top:x, left:y}
* Don't forget the callback event is now called 'onAfter', and if queuing is activated, then 'onAfterFirst' can be used.
* If the first axis to be scrolled, is already positioned, that animation will be skipped, to avoid a delay in the animation.
* The call to the plugin can be made in 2 different ways: $(...).scrollTo( target, duration, settings ) or $(...).scrollTo( target, settings ). Where one of the settings is 'duration'.
* If you find any bug, or you have any advice, don't hesitate to open an issue.

View File

@ -0,0 +1,27 @@
{
"name": "jquery.scrollTo",
"version": "1.4.14",
"description": "Easy element scrolling using jQuery.",
"homepage": "https://github.com/flesler/jquery.scrollTo",
"main": [
"./jquery.scrollTo.js"
],
"ignore": [
"**/.*",
"demo",
"tests",
"changes.txt",
"composer.json"
],
"dependencies": {
"jquery": ">=1.4"
},
"keywords": [
"browser", "animated", "animation",
"scrolling", "scroll", "links", "anchors"
],
"author": {
"name": "Ariel Flesler",
"web": "http://flesler.blogspot.com/"
}
}

View File

@ -0,0 +1,188 @@
/*!
* jQuery.scrollTo
* Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
* @projectDescription Easy element scrolling using jQuery.
* @author Ariel Flesler
* @version 1.4.14
*/
;(function (define) {
'use strict';
define(['jquery'], function ($) {
var $scrollTo = $.scrollTo = function( target, duration, settings ) {
return $(window).scrollTo( target, duration, settings );
};
$scrollTo.defaults = {
axis:'xy',
duration: 0,
limit:true
};
// Returns the element that needs to be animated to scroll the window.
// Kept for backwards compatibility (specially for localScroll & serialScroll)
$scrollTo.window = function( scope ) {
return $(window)._scrollable();
};
// Hack, hack, hack :)
// Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
$.fn._scrollable = function() {
return this.map(function() {
var elem = this,
isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1;
if (!isWin)
return elem;
var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
var isWebkit = /webkit/i.test(navigator.userAgent) && !/chrom/i.test(navigator.userAgent);
return isWebkit || doc.compatMode == 'BackCompat' ?
doc.body :
doc.documentElement;
});
};
$.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
settings.queue = settings.queue && settings.axis.length > 1;
if (settings.queue)
// Let's keep the overall duration
duration /= 2;
settings.offset = both( settings.offset );
settings.over = both( settings.over );
return this._scrollable().each(function() {
// Null target yields nothing, just like jQuery does
if (target == null) return;
var elem = this,
$elem = $(elem),
targ = target, toff, attr = {},
win = $elem.is('html,body');
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, no break!
targ = win ? $(targ) : $(targ, this);
if (!targ.length) return;
case 'object':
// 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,
old = elem[key],
max = $scrollTo.max(elem, axis);
if (toff) {// jQuery / DOMElement
attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] );
// If it's a dom element, reduce the margin
if (settings.margin) {
attr[key] -= parseInt(targ.css('margin'+Pos)) || 0;
attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 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 );
// Queueing axes
if (!i && settings.queue) {
// Don't waste time animating, if there's no need.
if (old != attr[key])
// Intermediate animation
animate( settings.onAfterFirst );
// Don't animate this axis again in the next iteration.
delete attr[key];
}
});
animate( settings.onAfter );
function animate( callback ) {
$elem.animate( attr, duration, settings.easing, callback && function() {
callback.call(this, targ, settings);
});
}
}).end();
};
// 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 (!$(elem).is('html,body'))
return elem[scroll] - $(elem)[Dim.toLowerCase()]();
var size = 'client' + Dim,
html = elem.ownerDocument.documentElement,
body = elem.ownerDocument.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 };
}
// AMD requirement
return $scrollTo;
})
}(typeof define === 'function' && define.amd ? define : function (deps, factory) {
if (typeof module !== 'undefined' && module.exports) {
// Node
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}));

View File

@ -0,0 +1,10 @@
/*!
* jQuery.scrollTo
* Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
* @projectDescription Easy element scrolling using jQuery.
* @author Ariel Flesler
* @version 1.4.14
*/
!function(e){"use strict";e(["jquery"],function(e){var t=e.scrollTo=function(t,n,o){return e(window).scrollTo(t,n,o)};function n(t){return e.isFunction(t)||e.isPlainObject(t)?t:{top:t,left:t}}return t.defaults={axis:"xy",duration:0,limit:!0},t.window=function(t){return e(window)._scrollable()},e.fn._scrollable=function(){return this.map(function(){if(!(!this.nodeName||-1!=e.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])))return this;var t=(this.contentWindow||this).document||this.ownerDocument||this;return/webkit/i.test(navigator.userAgent)&&!/chrom/i.test(navigator.userAgent)||"BackCompat"==t.compatMode?t.body:t.documentElement})},e.fn.scrollTo=function(o,i,r){return"object"==typeof i&&(r=i,i=0),"function"==typeof r&&(r={onAfter:r}),"max"==o&&(o=9e9),r=e.extend({},t.defaults,r),i=i||r.duration,r.queue=r.queue&&r.axis.length>1,r.queue&&(i/=2),r.offset=n(r.offset),r.over=n(r.over),this._scrollable().each(function(){if(null!=o){var s,u=this,a=e(u),f=o,c={},l=a.is("html,body");switch(typeof f){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(f)){f=n(f);break}if(!(f=l?e(f):e(f,this)).length)return;case"object":(f.is||f.style)&&(s=(f=e(f)).offset())}var d=e.isFunction(r.offset)&&r.offset(u,f)||r.offset;e.each(r.axis.split(""),function(e,n){var o="x"==n?"Left":"Top",i=o.toLowerCase(),h="scroll"+o,p=u[h],w=t.max(u,n);if(s)c[h]=s[i]+(l?0:p-a.offset()[i]),r.margin&&(c[h]-=parseInt(f.css("margin"+o))||0,c[h]-=parseInt(f.css("border"+o+"Width"))||0),c[h]+=d[i]||0,r.over[i]&&(c[h]+=f["x"==n?"width":"height"]()*r.over[i]);else{var y=f[i];c[h]=y.slice&&"%"==y.slice(-1)?parseFloat(y)/100*w:y}r.limit&&/^\d+$/.test(c[h])&&(c[h]=c[h]<=0?0:Math.min(c[h],w)),!e&&r.queue&&(p!=c[h]&&m(r.onAfterFirst),delete c[h])}),m(r.onAfter)}function m(e){a.animate(c,i,r.easing,e&&function(){e.call(this,f,r)})}}).end()},t.max=function(t,n){var o="x"==n?"Width":"Height",i="scroll"+o;if(!e(t).is("html,body"))return t[i]-e(t)[o.toLowerCase()]();var r="client"+o,s=t.ownerDocument.documentElement,u=t.ownerDocument.body;return Math.max(s[i],u[i])-Math.min(s[r],u[r])},t})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)});

View File

@ -0,0 +1,17 @@
{
"name": "jquery.scrollto",
"version": "1.4.14",
"description": "Easy element scrolling using jQuery.",
"main": "jquery.scrollTo.js",
"license": "MIT",
"ignore": ["**/.*","demo","tests","changes.txt","composer.json","scrollTo.jquery.json"],
"dependencies": { "jquery": ">=1.4" },
"homepage": "https://github.com/flesler/jquery.scrollTo/",
"bugs": "https://github.com/flesler/jquery.scrollTo/issues",
"repository": "git://github.com/flesler/jquery.scrollTo",
"keywords": ["browser","animated","animation","scrolling","scroll","links","anchors"],
"author": {
"name": "Ariel Flesler",
"web": "http://flesler.blogspot.com/"
}
}

View File

@ -0,0 +1,29 @@
{
"name": "scrollTo",
"title": "Ariel Flesler's jQuery scrollTo",
"description": "Easy element scrolling using jQuery.",
"keywords": ["browser", "animated", "animation", "scrolling", "scroll", "links", "anchors"],
"version": "1.4.14",
"author": {
"name": "Ariel Flesler",
"email": "aflesler@gmail.com",
"url": "http://flesler.blogspot.com"
},
"maintainers": [{
"name": "Ariel Flesler",
"email": "aflesler@gmail.com",
"url": "http://flesler.blogspot.com"
}],
"licenses": [{
"type": "MIT",
"url": "https://github.com/flesler/jquery.scrollTo/blob/master/LICENSE"
}],
"homepage": "https://github.com/flesler/jquery.scrollTo",
"docs": "http://flesler.blogspot.com/2007/10/jqueryscrollto.html",
"bugs": "https://github.com/flesler/jquery.scrollTo/issues",
"download": "https://github.com/flesler/jquery.scrollTo/releases",
"demo": "http://demos.flesler.com/jquery/scrollTo",
"dependencies": {
"jquery": ">=1.4"
}
}