PageSourceSearch

https://www.osterwiese.com/wp-content/themes/freimarkt/bootstrap/js/marquee.js

js osterwiese.com collected 2026-10-05 23:37:59 UTC 5,000 bytes, 100 lines download raw bytes

1/*!
2 * Pause jQuery plugin v0.1
3 *
4 * Copyright 2010 by Tobia Conforto <[email protected]>
5 *
6 * Based on Pause-resume-animation jQuery plugin by Joe Weitzel
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or(at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * this program; if not, write to the Free Software Foundation, Inc., 51
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22/* Changelog:
23 *
24 * 0.1    2010-06-13  Initial release
25 */
26(function() {
27	var $ = jQuery,
28		pauseId = 'jQuery.pause',
29		uuid = 1,
30		oldAnimate = $.fn.animate,
31		anims = {};
32
33	function now() { return new Date().getTime(); }
34
35	$.fn.animate = function(prop, speed, easing, callback) {
36		var optall = $.speed(speed, easing, callback);
37		optall.complete = optall.old; // unwrap callback
38		return this.each(function() {
39			// check pauseId
40			if (! this[pauseId])
41				this[pauseId] = uuid++;
42			// start animation
43			var opt = $.extend({}, optall);
44			oldAnimate.apply($(this), [prop, $.extend({}, opt)]);
45			// store data
46			anims[this[pauseId]] = {
47				run: true,
48				prop: prop,
49				opt: opt,
50				start: now(),
51				done: 0
52			};
53		});
54	};
55
56	$.fn.pause = function() {
57		return this.each(function() {
58			// check pauseId
59			if (! this[pauseId])
60				this[pauseId] = uuid++;
61			// fetch data
62			var data = anims[this[pauseId]];
63			if (data && data.run) {
64				data.done += now() - data.start;
65				if (data.done > data.opt.duration) {
66					// remove stale entry
67					delete anims[this[pauseId]];
68				} else {
69					// pause animation
70					$(this).stop();
71					data.run = false;
72				}
73			}
74		});
75	};
76
77	$.fn.resume = function() {
78		return this.each(function() {
79			// check pauseId
80			if (! this[pauseId])
81				this[pauseId] = uuid++;
82			// fetch data
83			var data = anims[this[pauseId]];
84			if (data && ! data.run) {
85				// resume animation
86				data.opt.duration -= data.done;
87				data.done = 0;
88				data.run = true;
89				data.start = now();
90				oldAnimate.apply($(this), [data.prop, $.extend({}, data.opt)]);
91			}
92		});
93	};
94})();
95/**
96 * jQuery.marquee - scrolling text horizontally
97 * Date: 11/01/2013
98 * @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
99 */
100(function(e){e.fn.marquee=function(t){return this.each(function(){function h(){if(e.fn.pause){i.pause();r.trigger("paused")}}function p(){if(e.fn.resume){i.resume();r.trigger("resumed")}}var n=e.extend({},e.fn.marquee.defaults,t),r=e(this),i,s,o,u,a;if(r.data().delaybeforestart){r.data().delayBeforeStart=r.data().delaybeforestart;delete r.data().delaybeforestart}if(r.data().pauseonhover){r.data().pauseOnHover=r.data().pauseonhover;delete r.data().pauseonhover}if(r.data().pauseoncycle){r.data().pauseOnCycle=r.data().pauseoncycle;delete r.data().pauseoncycle}n=e.extend({},n,r.data());u=n.direction=="up"||n.direction=="down";n.gap=n.duplicated?n.gap:0;r.wrapInner('<div class="js-marquee"></div>');var f=r.find(".js-marquee").css({"margin-right":n.gap,"float":"left"});if(n.duplicated){f.clone().appendTo(r)}r.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');i=r.find(".js-marquee-wrapper");if(u){var l=r.height();i.removeAttr("style");r.height(l);r.find(".js-marquee").css({"float":"none","margin-bottom":n.gap,"margin-right":0});if(n.duplicated)r.find(".js-marquee:last").css({"margin-bottom":0});var c=r.find(".js-marquee:first").height()+n.gap;n.speed=(parseInt(c,10)+parseInt(l,10))/parseInt(l,10)*n.speed}else{a=r.find(".js-marquee:first").width()+n.gap;s=r.width();n.speed=(parseInt(a,10)+parseInt(s,10))/parseInt(s,10)*n.speed}if(n.duplicated){n.speed=n.speed/2}var d=function(){if(u){if(n.duplicated){i.css({"margin-top":n.direction=="up"?0:"-"+c+"px"});o={"margin-top":n.direction=="up"?"-"+c+"px":0}}else{i.css({"margin-top":n.direction=="up"?l:"-"+c+"px"});o={"margin-top":n.direction=="up"?"-"+i.height()+"px":l}}}else{if(n.duplicated){i.css("margin-left",n.direction=="left"?0:"-"+a+"px");o={"margin-left":n.direction=="left"?"-"+a+"px":0}}else{i.css("margin-left",n.direction=="left"?s:"-"+a+"px");o={"margin-left":n.direction=="left"?"-"+a+"px":s}}}r.trigger("beforeStarting");i.animate(o,n.speed,n.easing,function(){r.trigger("finished");
100if(n.pauseOnCycle){setTimeout(d,n.delayBeforeStart)}else{d()}})};r.on("pause",h);r.on("resume",p);if(n.pauseOnHover){r.hover(h,p)}setTimeout(d,n.delayBeforeStart)})};e.fn.marquee.defaults={easing:"linear",speed:5e3,gap:20,delayBeforeStart:0,direction:"left",duplicated:false,pauseOnHover:false,pauseOnCycle:false}})(jQuery)

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.