<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>http://kamelopedia.net/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AJQuery.Marquee2.js</id>
	<title>MediaWiki:JQuery.Marquee2.js - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="http://kamelopedia.net/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AJQuery.Marquee2.js"/>
	<link rel="alternate" type="text/html" href="http://kamelopedia.net/index.php?title=MediaWiki:JQuery.Marquee2.js&amp;action=history"/>
	<updated>2026-11-01T16:32:58Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Kamelopedia</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://kamelopedia.net/index.php?title=MediaWiki:JQuery.Marquee2.js&amp;diff=531105&amp;oldid=prev</id>
		<title>Nachteule: AZ: Die Seite wurde neu angelegt.</title>
		<link rel="alternate" type="text/html" href="http://kamelopedia.net/index.php?title=MediaWiki:JQuery.Marquee2.js&amp;diff=531105&amp;oldid=prev"/>
		<updated>2014-01-17T00:39:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/KP:AZ&quot; class=&quot;mw-redirect&quot; title=&quot;KP:AZ&quot;&gt;AZ&lt;/a&gt;: Die Seite wurde neu angelegt.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * jQuery.marquee - scrolling text horizontally&lt;br /&gt;
 * Date: 20/02/2013&lt;br /&gt;
 * @author Aamir Afridi - aamirafridi(at)gmail(dot)com | http://aamirafridi.com/jquery/jquery-marquee-plugin&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
;(function ($) {&lt;br /&gt;
    $.fn.marquee = function (options) {&lt;br /&gt;
        return this.each(function () {&lt;br /&gt;
            // Extend the options if any provided&lt;br /&gt;
            var o = $.extend({}, $.fn.marquee.defaults, options),&lt;br /&gt;
                $this = $(this),&lt;br /&gt;
                $marqueeWrapper,&lt;br /&gt;
                containerWidth,&lt;br /&gt;
                animationCss,&lt;br /&gt;
                verticalDir,&lt;br /&gt;
                elWidth,&lt;br /&gt;
                playState = &amp;#039;animation-play-state&amp;#039;,&lt;br /&gt;
                css3AnimationIsSupported = false;&lt;br /&gt;
&lt;br /&gt;
            //For details https://twitter.com/aamirafridi/status/403848044069679104 - Can&amp;#039;t find a better solution :/&lt;br /&gt;
            if (typeof $this.data().delaybeforestart !== &amp;#039;undefined&amp;#039;) {&lt;br /&gt;
                $this.data().delayBeforeStart = $this.data().delaybeforestart;&lt;br /&gt;
                delete $this.data().delaybeforestart;&lt;br /&gt;
            }&lt;br /&gt;
            if (typeof $this.data().pauseonhover !== &amp;#039;undefined&amp;#039;) {&lt;br /&gt;
                $this.data().pauseOnHover = $this.data().pauseonhover;&lt;br /&gt;
                delete $this.data().pauseonhover;&lt;br /&gt;
            }&lt;br /&gt;
            if (typeof $this.data().pauseoncycle !== &amp;#039;undefined&amp;#039;) {&lt;br /&gt;
                $this.data().pauseOnCycle = $this.data().pauseoncycle;&lt;br /&gt;
                delete $this.data().pauseoncycle;&lt;br /&gt;
            }&lt;br /&gt;
            if (typeof $this.data().allowcss3support !== &amp;#039;undefined&amp;#039;) {&lt;br /&gt;
                $this.data().allowCss3Support = $this.data().allowcss3support;&lt;br /&gt;
                delete $this.data().allowcss3support;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            //check if element has data attributes. They have top priority&lt;br /&gt;
            o = $.extend({}, o, $this.data());&lt;br /&gt;
&lt;br /&gt;
            //since speed option is changed to duration, to support speed for those who are already using it&lt;br /&gt;
            o.duration = o.speed || o.duration;&lt;br /&gt;
&lt;br /&gt;
            //Shortcut to see if direction is upward or downward&lt;br /&gt;
            verticalDir = o.direction == &amp;#039;up&amp;#039; || o.direction == &amp;#039;down&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
            //no gap if not duplicated&lt;br /&gt;
            o.gap = o.duplicated ? o.gap : 0;&lt;br /&gt;
&lt;br /&gt;
            //wrap inner content into a div&lt;br /&gt;
            $this.wrapInner(&amp;#039;&amp;lt;div class=&amp;quot;js-marquee&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
            //Make copy of the element&lt;br /&gt;
            var $el = $this.find(&amp;#039;.js-marquee&amp;#039;).css({&lt;br /&gt;
                &amp;#039;margin-right&amp;#039;: o.gap,&lt;br /&gt;
                &amp;#039;float&amp;#039;: &amp;#039;left&amp;#039;&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
            if (o.duplicated) {&lt;br /&gt;
                $el.clone().appendTo($this);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            //wrap both inner elements into one div&lt;br /&gt;
            $this.wrapInner(&amp;#039;&amp;lt;div style=&amp;quot;width:100000px&amp;quot; class=&amp;quot;js-marquee-wrapper&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
            //Save the reference of the wrapper&lt;br /&gt;
            $marqueeWrapper = $this.find(&amp;#039;.js-marquee-wrapper&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
            //If direction is up or down, get the height of main element&lt;br /&gt;
            if (verticalDir) {&lt;br /&gt;
                var containerHeight = $this.height();&lt;br /&gt;
                $marqueeWrapper.removeAttr(&amp;#039;style&amp;#039;);&lt;br /&gt;
                $this.height(containerHeight);&lt;br /&gt;
&lt;br /&gt;
                //Change the CSS for js-marquee element&lt;br /&gt;
                $this.find(&amp;#039;.js-marquee&amp;#039;).css({&lt;br /&gt;
                    &amp;#039;float&amp;#039;: &amp;#039;none&amp;#039;,&lt;br /&gt;
                    &amp;#039;margin-bottom&amp;#039;: o.gap,&lt;br /&gt;
                    &amp;#039;margin-right&amp;#039;: 0&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                //Remove bottom margin from 2nd element if duplicated&lt;br /&gt;
                if (o.duplicated) $this.find(&amp;#039;.js-marquee:last&amp;#039;).css({&lt;br /&gt;
                    &amp;#039;margin-bottom&amp;#039;: 0&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                var elHeight = $this.find(&amp;#039;.js-marquee:first&amp;#039;).height() + o.gap;&lt;br /&gt;
&lt;br /&gt;
                /* adjust the animation speed according to the text length&lt;br /&gt;
		   formula is to: (Height of the text node / Height of the main container) * speed; */&lt;br /&gt;
                o.duration = ((parseInt(elHeight, 10) + parseInt(containerHeight, 10)) / parseInt(containerHeight, 10)) * o.duration;&lt;br /&gt;
&lt;br /&gt;
            } else {&lt;br /&gt;
                //Save the width of the each element so we can use it in animation&lt;br /&gt;
                elWidth = $this.find(&amp;#039;.js-marquee:first&amp;#039;).width() + o.gap;&lt;br /&gt;
&lt;br /&gt;
                //container width&lt;br /&gt;
                containerWidth = $this.width();&lt;br /&gt;
&lt;br /&gt;
                /* adjust the animation speed according to the text length&lt;br /&gt;
		   formula is to: (Width of the text node / Width of the main container) * speed; */&lt;br /&gt;
                o.duration = ((parseInt(elWidth, 10) + parseInt(containerWidth, 10)) / parseInt(containerWidth, 10)) * o.duration;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            //if duplicated than reduce the speed&lt;br /&gt;
            if (o.duplicated) {&lt;br /&gt;
                o.duration = o.duration / 2;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            function objToString (obj) {&lt;br /&gt;
                var tabjson=[];&lt;br /&gt;
                for (var p in obj) {&lt;br /&gt;
                    if (obj.hasOwnProperty(p)) {&lt;br /&gt;
                        tabjson.push(p + &amp;#039;:&amp;#039; + obj[p]);&lt;br /&gt;
                    }&lt;br /&gt;
                } &lt;br /&gt;
                tabjson.push()&lt;br /&gt;
                return &amp;#039;{&amp;#039;+tabjson.join(&amp;#039;,&amp;#039;)+&amp;#039;}&amp;#039;;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            function pause() {&lt;br /&gt;
                //pause using css3&lt;br /&gt;
                if(css3AnimationIsSupported &amp;amp;&amp;amp; o.allowCss3Support) {&lt;br /&gt;
                    return $marqueeWrapper.css(playState, &amp;#039;paused&amp;#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                //pause using pause plugin&lt;br /&gt;
                if ($.fn.pause) {&lt;br /&gt;
                    $marqueeWrapper.pause();&lt;br /&gt;
                    //fire event&lt;br /&gt;
                    $this.trigger(&amp;#039;paused&amp;#039;);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            function resume() {&lt;br /&gt;
                //resume using css3&lt;br /&gt;
                if(css3AnimationIsSupported &amp;amp;&amp;amp; o.allowCss3Support) {&lt;br /&gt;
                    return $marqueeWrapper.css(playState, &amp;#039;running&amp;#039;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                //resume using pause plugin&lt;br /&gt;
                if ($.fn.resume) {&lt;br /&gt;
                    $marqueeWrapper.resume();&lt;br /&gt;
                    //fire event&lt;br /&gt;
                    $this.trigger(&amp;#039;resumed&amp;#039;);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            if(o.allowCss3Support) {&lt;br /&gt;
                    var&lt;br /&gt;
                        elm = document.body || document.createElement(&amp;#039;div&amp;#039;),&lt;br /&gt;
                        animationName = &amp;#039;marqueeAnimation-&amp;#039; + Math.floor(Math.random()*10000000),&lt;br /&gt;
                        domPrefixes = &amp;#039;Webkit Moz O ms Khtml&amp;#039;.split(&amp;#039; &amp;#039;),&lt;br /&gt;
                        animationString = &amp;#039;animation&amp;#039;,&lt;br /&gt;
                        animationCss3Str = &amp;#039;&amp;#039;,&lt;br /&gt;
                        $styles = $(&amp;#039;style&amp;#039;),&lt;br /&gt;
                        keyframeString = &amp;#039;&amp;#039;;&lt;br /&gt;
                    &lt;br /&gt;
                //Check css3 support&lt;br /&gt;
                if( elm.style.animation ) {&lt;br /&gt;
                    keyframeString = &amp;#039;@keyframes &amp;#039; + animationName + &amp;#039; &amp;#039;;&lt;br /&gt;
                    css3AnimationIsSupported = true;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if( css3AnimationIsSupported === false ) {&lt;br /&gt;
                    for( var i = 0; i &amp;lt; domPrefixes.length; i++ ) {&lt;br /&gt;
                        if( elm.style[ domPrefixes[i] + &amp;#039;AnimationName&amp;#039; ] !== undefined ) {&lt;br /&gt;
                            var prefix = &amp;#039;-&amp;#039; + domPrefixes[ i ].toLowerCase() + &amp;#039;-&amp;#039;;&lt;br /&gt;
                            animationString = prefix + animationString;&lt;br /&gt;
                            playState = prefix + playState;&lt;br /&gt;
                            keyframeString = &amp;#039;@&amp;#039;+prefix+&amp;#039;keyframes &amp;#039; + animationName + &amp;#039; &amp;#039;;&lt;br /&gt;
                            css3AnimationIsSupported = true;&lt;br /&gt;
                            break;&lt;br /&gt;
                        }&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            &lt;br /&gt;
                if(css3AnimationIsSupported) {&lt;br /&gt;
                    animationCss3Str = animationName + &amp;#039; &amp;#039; + o.duration/1000 + &amp;#039;s &amp;#039; + o.delayBeforeStart/1000 + &amp;#039;s infinite &amp;#039; + o.css3easing;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
                //Animate recursive method&lt;br /&gt;
            var animate = function () {&lt;br /&gt;
                if (verticalDir) {&lt;br /&gt;
                    if (o.duplicated) {&lt;br /&gt;
                        $marqueeWrapper.css(&amp;#039;margin-top&amp;#039;, o.direction == &amp;#039;up&amp;#039; ? 0 : &amp;#039;-&amp;#039; + elHeight + &amp;#039;px&amp;#039;);&lt;br /&gt;
                        animationCss = {&lt;br /&gt;
                            &amp;#039;margin-top&amp;#039;: o.direction == &amp;#039;up&amp;#039; ? &amp;#039;-&amp;#039; + elHeight + &amp;#039;px&amp;#039; : 0&lt;br /&gt;
                        }&lt;br /&gt;
                    } else {&lt;br /&gt;
                        $marqueeWrapper.css(&amp;#039;margin-top&amp;#039;, o.direction == &amp;#039;up&amp;#039; ? containerHeight + &amp;#039;px&amp;#039; : &amp;#039;-&amp;#039; + elHeight + &amp;#039;px&amp;#039;);&lt;br /&gt;
                        animationCss = {&lt;br /&gt;
                            &amp;#039;margin-top&amp;#039;: o.direction == &amp;#039;up&amp;#039; ? &amp;#039;-&amp;#039; + ($marqueeWrapper.height()) + &amp;#039;px&amp;#039; : containerHeight + &amp;#039;px&amp;#039;&lt;br /&gt;
                        };&lt;br /&gt;
                    }&lt;br /&gt;
                } else {&lt;br /&gt;
                    if (o.duplicated) {&lt;br /&gt;
                        $marqueeWrapper.css(&amp;#039;margin-left&amp;#039;, o.direction == &amp;#039;left&amp;#039; ? 0 : &amp;#039;-&amp;#039; + elWidth + &amp;#039;px&amp;#039;);&lt;br /&gt;
                        animationCss = {&lt;br /&gt;
                            &amp;#039;margin-left&amp;#039;: o.direction == &amp;#039;left&amp;#039; ? &amp;#039;-&amp;#039; + elWidth + &amp;#039;px&amp;#039; : 0&lt;br /&gt;
                        };&lt;br /&gt;
                    } else {&lt;br /&gt;
                        $marqueeWrapper.css(&amp;#039;margin-left&amp;#039;, o.direction == &amp;#039;left&amp;#039; ? containerWidth + &amp;#039;px&amp;#039; : &amp;#039;-&amp;#039; + elWidth + &amp;#039;px&amp;#039;);&lt;br /&gt;
                        animationCss = {&lt;br /&gt;
                            &amp;#039;margin-left&amp;#039;: o.direction == &amp;#039;left&amp;#039; ? &amp;#039;-&amp;#039; + elWidth + &amp;#039;px&amp;#039; : containerWidth + &amp;#039;px&amp;#039;&lt;br /&gt;
                        };&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                //fire event&lt;br /&gt;
                $this.trigger(&amp;#039;beforeStarting&amp;#039;);&lt;br /&gt;
          &lt;br /&gt;
                //If css3 support is available than do it with css3, otherwise use jQuery as fallback&lt;br /&gt;
                if(css3AnimationIsSupported) {&lt;br /&gt;
                    //Add css3 animation to the element&lt;br /&gt;
                    $marqueeWrapper.css(animationString, animationCss3Str);&lt;br /&gt;
                    var keyframeCss = keyframeString + &amp;#039; { 100%  &amp;#039;+ objToString(animationCss) +&amp;#039;}&amp;#039;;&lt;br /&gt;
                    &lt;br /&gt;
                    //Now add the keyframe animation to the head&lt;br /&gt;
                    if($styles.length!=0) {&lt;br /&gt;
                        $styles.last().append(keyframeCss)&lt;br /&gt;
                    }&lt;br /&gt;
                    else {&lt;br /&gt;
                        $(&amp;#039;head&amp;#039;).append(&amp;#039;&amp;lt;style&amp;gt;&amp;#039; + keyframeCss + &amp;#039;&amp;lt;/style&amp;gt;&amp;#039;);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else {&lt;br /&gt;
                    //Start animating&lt;br /&gt;
                    $marqueeWrapper.animate(animationCss, o.duration, o.easing, function () {&lt;br /&gt;
                        //fire event&lt;br /&gt;
                        $this.trigger(&amp;#039;finished&amp;#039;);&lt;br /&gt;
                        //animate again&lt;br /&gt;
                        if (o.pauseOnCycle) {&lt;br /&gt;
                            setTimeout(animate, o.delayBeforeStart);&lt;br /&gt;
                        } else {&lt;br /&gt;
                            animate();&lt;br /&gt;
                        }&lt;br /&gt;
                    });&lt;br /&gt;
                }&lt;br /&gt;
            };&lt;br /&gt;
&lt;br /&gt;
            //bind pause and resume events&lt;br /&gt;
            $this.bind(&amp;#039;pause&amp;#039;, pause);&lt;br /&gt;
            $this.bind(&amp;#039;resume&amp;#039;, resume);&lt;br /&gt;
&lt;br /&gt;
            if (o.pauseOnHover) {&lt;br /&gt;
                $this.hover(pause, resume);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            //If css3 animation is supported than call animate method at once&lt;br /&gt;
            if(css3AnimationIsSupported &amp;amp;&amp;amp; o.allowCss3Support) {&lt;br /&gt;
                animate();&lt;br /&gt;
            }&lt;br /&gt;
            else {&lt;br /&gt;
                //Starts the recursive method&lt;br /&gt;
                setTimeout(animate, o.delayBeforeStart);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
    }; //End of Plugin&lt;br /&gt;
&lt;br /&gt;
    // Public: plugin defaults options&lt;br /&gt;
    $.fn.marquee.defaults = {&lt;br /&gt;
        //If you wish to always animate using jQuery&lt;br /&gt;
        allowCss3Support: true,&lt;br /&gt;
        //works when allowCss3Support is set to true - for full list see http://www.w3.org/TR/2013/WD-css3-transitions-20131119/#transition-timing-function&lt;br /&gt;
        css3easing: &amp;#039;linear&amp;#039;,&lt;br /&gt;
        //requires jQuery easing plugin. Default is &amp;#039;linear&amp;#039;&lt;br /&gt;
        easing: &amp;#039;linear&amp;#039;,&lt;br /&gt;
        //pause time before the next animation turn in milliseconds&lt;br /&gt;
        delayBeforeStart: 0,&lt;br /&gt;
        //&amp;#039;left&amp;#039;, &amp;#039;right&amp;#039;, &amp;#039;up&amp;#039; or &amp;#039;down&amp;#039;&lt;br /&gt;
        direction: &amp;#039;left&amp;#039;,&lt;br /&gt;
        //true or false - should the marquee be duplicated to show an effect of continues flow&lt;br /&gt;
        duplicated: false,&lt;br /&gt;
        //speed in milliseconds of the marquee in milliseconds&lt;br /&gt;
        duration: 5000,&lt;br /&gt;
        //gap in pixels between the tickers&lt;br /&gt;
        gap: 20,&lt;br /&gt;
        //on cycle pause the marquee&lt;br /&gt;
        pauseOnCycle: false,&lt;br /&gt;
        //on hover pause the marquee - using jQuery plugin https://github.com/tobia/Pause&lt;br /&gt;
        pauseOnHover: false&lt;br /&gt;
    };&lt;br /&gt;
})(jQuery);&lt;/div&gt;</summary>
		<author><name>Nachteule</name></author>
	</entry>
</feed>