PageSourceSearch

https://www.dietmar-wunder.de/wsScripts/plugins/jquery.stellar-min.js

js dietmar-wunder.de collected 2026-10-04 10:58:08 UTC 12,555 bytes, 1 lines download raw bytes

1!function(t,e,i,s){function o(e,i){this.element=e,this.options=t.extend({},r,i),this._defaults=r,this._name=n,this.init()}var n="stellar",r={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(t){t.hide()},showElement:function(t){t.show()}},a={scroll:{getLeft:function(t){return t.scrollLeft()},setLeft:function(t,e){t.scrollLeft(e)},getTop:function(t){return t.scrollTop()},setTop:function(t,e){t.scrollTop(e)}},position:{getLeft:function(t){return-1*parseInt(t.css("left"),10)},getTop:function(t){return-1*parseInt(t.css("top"),10)}},margin:{getLeft:function(t){return-1*parseInt(t.css("margin-left"),10)},getTop:function(t){return-1*parseInt(t.css("margin-top"),10)}},transform:{getLeft:function(t){var e=getComputedStyle(t[0])[c];return"none"!==e?-1*parseInt(e.match(/(-?[0-9]+)/g)[4],10):0},getTop:function(t){var e=getComputedStyle(t[0])[c];return"none"!==e?-1*parseInt(e.match(/(-?[0-9]+)/g)[5],10):0}}},l={position:{setLeft:function(t,e){t.css("left",e)},setTop:function(t,e){t.css("top",e)}},transform:{setPosition:function(t,e,i,s,o){t[0].style[c]="translate3d("+(e-i)+"px, "+(s-o)+"px, 0)"}}},f,c=function(){var e=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,i=t("script")[0].style,s="",o;for(o in i)if(e.test(o)){s=o.match(e)[0];break}return"WebkitOpacity"in i&&(s="Webkit"),"KhtmlOpacity"in i&&(s="Khtml"),function(t){return s+(s.length>0?t.charAt(0).toUpperCase()+t.slice(1):t)}}()("transform"),h=void 0!==t("<div />",{style:"background:#fff"}).css("background-position-x"),p=h?function(t,e,i){t.css({"background-position-x":e,"background-position-y":i})}:function(t,e,i){t.css("background-position",e+" "+i)},d=h?function(t){return[t.css("background-position-x"),t.css("background-position-y")]}:function(t){return t.css("background-position").split(" ")},u=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};o.prototype={init:function(){this.options.name=n+"_"+Math.floor(1e9*Math.random()),this._defineElements(),this._defineGetters(),this._defineSetters(),this._handleWindowLoadAndResize(),this._detectViewport(),this.refresh({firstLoad:!0}),"scroll"===this.options.scrollProperty?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===i.body&&(this.element=e),this.$scrollElement=t(this.element),this.$element=this.element===e?t("body"):this.$scrollElement,this.$viewportElement=void 0!==this.options.viewportElement?t(this.options.viewportElement):this.$scrollElement[0]===e||"scroll"===this.options.scrollProperty?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var t=this,e=a[t.options.scrollProperty];this._getScrollLeft=function(){return e.getLeft(t.$scrollElement)},this._getScrollTop=function(){return e.getTop(t.$scrollElement)}},_defineSetters:function(){var e=this,i=a[e.options.scrollProperty],s=l[e.options.positionProperty],o=i.setLeft,n=i.setTop;this._setScrollLeft="function"==typeof o?function(t){o(e.$scrollElement,t)}:t.noop,this._setScrollTop="function"==typeof n?function(t){n(e.$scrollElement,t)}:t.noop,this._setPosition=s.setPosition||function(t,i,o,n,r){e.options.horizontalScrolling&&s.setLeft(t,i,o),e.options.verticalScrolling&&s.setTop(t,n,r)}},_handleWindowLoadAndResize:function(){var i=this,s=t(e);i.options.responsive&&s.bind("load."+this.name,(function(){i.refresh()})),s.bind("resize."+this.name,(function(){i._detectViewport(),i.options.responsive&&i.refresh()}))},refresh:function(i){var s=this,o=s._getScrollLeft(),n=s._getScrollTop();i&&i.firstLoad||this._reset(),this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),i&&i.firstLoad&&/WebKit/.test(navigator.userAgent)&&t(e).load((function(){var t=s._getScrollLeft(),e=s._getScrollTop();s._setScrollLeft(t+1),s._setScrollTop(e+1),s._setScrollLeft(t),s._setScrollTop(e)})),this._setScrollLeft(o),this._setScrollTop(n)},_detectViewport:function(){var t=this.$viewportElement.offset(),e=null!=t;this.viewportWidth=this.$viewportElement.width(),this.viewportHe
1ight=this.$viewportElement.height(),this.viewportOffsetTop=e?t.top:0,this.viewportOffsetLeft=e?t.left:0},_findParticles:function(){var e=this,i=this._getScrollLeft(),s=this._getScrollTop();if(void 0!==this.particles)for(var o=this.particles.length-1;o>=0;o--)this.particles[o].$element.data("stellar-elementIsActive",void 0);this.particles=[],this.options.parallaxElements&&this.$element.find("[data-stellar-ratio]").each((function(i){var s=t(this),o,n,r,a,l,f,c,h,p,d=0,u=0,g=0,m=0;if(s.data("stellar-elementIsActive")){if(s.data("stellar-elementIsActive")!==this)return}else s.data("stellar-elementIsActive",this);e.options.showElement(s),s.data("stellar-startingLeft")?(s.css("left",s.data("stellar-startingLeft")),s.css("top",s.data("stellar-startingTop"))):(s.data("stellar-startingLeft",s.css("left")),s.data("stellar-startingTop",s.css("top"))),r=s.position().left,a=s.position().top,l="auto"===s.css("margin-left")?0:parseInt(s.css("margin-left"),10),f="auto"===s.css("margin-top")?0:parseInt(s.css("margin-top"),10),h=s.offset().left-l,p=s.offset().top-f,s.parents().each((function(){var e=t(this);if(!0===e.data("stellar-offset-parent"))return d=g,u=m,c=e,!1;g+=e.position().left,m+=e.position().top})),o=void 0!==s.data("stellar-horizontal-offset")?s.data("stellar-horizontal-offset"):void 0!==c&&void 0!==c.data("stellar-horizontal-offset")?c.data("stellar-horizontal-offset"):e.horizontalOffset,n=void 0!==s.data("stellar-vertical-offset")?s.data("stellar-vertical-offset"):void 0!==c&&void 0!==c.data("stellar-vertical-offset")?c.data("stellar-vertical-offset"):e.verticalOffset,e.particles.push({$element:s,$offsetParent:c,isFixed:"fixed"===s.css("position"),horizontalOffset:o,verticalOffset:n,startingPositionLeft:r,startingPositionTop:a,startingOffsetLeft:h,startingOffsetTop:p,parentOffsetLeft:d,parentOffsetTop:u,stellarRatio:void 0!==s.data("stellar-ratio")?s.data("stellar-ratio"):1,width:s.outerWidth(!0),height:s.outerHeight(!0),isHidden:!1})}))},_findBackgrounds:function(){var e=this,i=this._getScrollLeft(),s=this._getScrollTop(),o;this.backgrounds=[],this.options.parallaxBackgrounds&&(o=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(o=o.add(this.$element)),o.each((function(){var o=t(this),n=d(o),r,a,l,f,c,h,u,g,m,v=0,L=0,_=0,O=0;if(o.data("stellar-backgroundIsActive")){if(o.data("stellar-backgroundIsActive")!==this)return}else o.data("stellar-backgroundIsActive",this);o.data("stellar-backgroundStartingLeft")?p(o,o.data("stellar-backgroundStartingLeft"),o.data("stellar-backgroundStartingTop")):(o.data("stellar-backgroundStartingLeft",n[0]),o.data("stellar-backgroundStartingTop",n[1])),c="auto"===o.css("margin-left")?0:parseInt(o.css("margin-left"),10),h="auto"===o.css("margin-top")?0:parseInt(o.css("margin-top"),10),u=o.offset().left-c-i,g=o.offset().top-h-s,o.parents().each((function(){var e=t(this);if(!0===e.data("stellar-offset-parent"))return v=_,L=O,m=e,!1;_+=e.position().left,O+=e.position().top})),r=void 0!==o.data("stellar-horizontal-offset")?o.data("stellar-horizontal-offset"):void 0!==m&&void 0!==m.data("stellar-horizontal-offset")?m.data("stellar-horizontal-offset"):e.horizontalOffset,a=void 0!==o.data("stellar-vertical-offset")?o.data("stellar-vertical-offset"):void 0!==m&&void 0!==m.data("stellar-vertical-offset")?m.data("stellar-vertical-offset"):e.verticalOffset,e.backgrounds.push({$element:o,$offsetParent:m,isFixed:"fixed"===o.css("background-attachment"),horizontalOffset:r,verticalOffset:a,startingValueLeft:n[0],startingValueTop:n[1],startingBackgroun
1dPositionLeft:isNaN(parseInt(n[0],10))?0:parseInt(n[0],10),startingBackgroundPositionTop:isNaN(parseInt(n[1],10))?0:parseInt(n[1],10),startingPositionLeft:o.position().left,startingPositionTop:o.position().top,startingOffsetLeft:u,startingOffsetTop:g,parentOffsetLeft:v,parentOffsetTop:L,stellarRatio:void 0===o.data("stellar-background-ratio")?1:o.data("stellar-background-ratio")})})))},_reset:function(){var t,e,i,s,o;for(o=this.particles.length-1;o>=0;o--)e=(t=this.particles[o]).$element.data("stellar-startingLeft"),i=t.$element.data("stellar-startingTop"),this._setPosition(t.$element,e,e,i,i),this.options.showElement(t.$element),t.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(o=this.backgrounds.length-1;o>=0;o--)(s=this.backgrounds[o]).$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),p(s.$element,s.startingValueLeft,s.startingValueTop)},destroy:function(){this._reset(),this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name),this._animationLoop=t.noop,t(e).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var i=this,s=t(e);s.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),"function"==typeof this.options.horizontalOffset?(this.horizontalOffset=this.options.horizontalOffset(),s.bind("resize.horizontal-"+this.name,(function(){i.horizontalOffset=i.options.horizontalOffset()}))):this.horizontalOffset=this.options.horizontalOffset,"function"==typeof this.options.verticalOffset?(this.verticalOffset=this.options.verticalOffset(),s.bind("resize.vertical-"+this.name,(function(){i.verticalOffset=i.options.verticalOffset()}))):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var t=this._getScrollLeft(),e=this._getScrollTop(),i,s,o,n,r,a,l,f=!0,c=!0,h,d,u,g,m;if(this.currentScrollLeft!==t||this.currentScrollTop!==e||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){for(this.currentScrollLeft=t,this.currentScrollTop=e,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight,m=this.particles.length-1;m>=0;m--)n=(o=this.particles[m]).isFixed?1:0,this.options.horizontalScrolling?u=(h=(t+o.horizontalOffset+this.viewportOffsetLeft+o.startingPositionLeft-o.startingOffsetLeft+o.parentOffsetLeft)*-(o.stellarRatio+n-1)+o.startingPositionLeft)-o.startingPositionLeft+o.startingOffsetLeft:(h=o.startingPositionLeft,u=o.startingOffsetLeft),this.options.verticalScrolling?g=(d=(e+o.verticalOffset+this.viewportOffsetTop+o.startingPositionTop-o.startingOffsetTop+o.parentOffsetTop)*-(o.stellarRatio+n-1)+o.startingPositionTop)-o.startingPositionTop+o.startingOffsetTop:(d=o.startingPositionTop,g=o.startingOffsetTop),this.options.hideDistantElements&&(c=!this.options.horizontalScrolling||u+o.width>(o.isFixed?0:t)&&u<(o.isFixed?0:t)+this.viewportWidth+this.viewportOffsetLeft,f=!this.options.verticalScrolling||g+o.height>(o.isFixed?0:e)&&g<(o.isFixed?0:e)+this.viewportHeight+this.viewportOffsetTop),c&&f?(o.isHidden&&(this.options.showElement(o.$element),o.isHidden=!1),this._setPosition(o.$element,h,o.startingPositionLeft,d,o.startingPositionTop)):o.isHidden||(this.options.hideElement(o.$element),o.isHidden=!0);for(m=this.backgrounds.length-1;m>=0;m--)n=(r=this.backgrounds[m]).isFixed?0:1,a=this.options.horizontalScrolling?(t+r.horizontalOffset-this.viewportOffsetLeft-r.startingOffsetLeft+r.parentOffsetLeft-r.startingBackgroun
1dPositionLeft)*(n-r.stellarRatio)+"px":r.startingValueLeft,l=this.options.verticalScrolling?(e+r.verticalOffset-this.viewportOffsetTop-r.startingOffsetTop+r.parentOffsetTop-r.startingBackgroundPositionTop)*(n-r.stellarRatio)+"px":r.startingValueTop,p(r.$element,a,l)}},_handleScrollEvent:function(){var t=this,e=!1,i=function(){t._repositionElements(),e=!1},s=function(){e||(u(i),e=!0)};this.$scrollElement.bind("scroll."+this.name,s),s()},_startAnimationLoop:function(){var t=this;this._animationLoop=function(){u(t._animationLoop),t._repositionElements()},this._animationLoop()}},t.fn[n]=function(e){var i=arguments;return void 0===e||"object"==typeof e?this.each((function(){t.data(this,"plugin_"+n)||t.data(this,"plugin_"+n,new o(this,e))})):"string"==typeof e&&"_"!==e[0]&&"init"!==e?this.each((function(){var s=t.data(this,"plugin_"+n);s instanceof o&&"function"==typeof s[e]&&s[e].apply(s,Array.prototype.slice.call(i,1)),"destroy"===e&&t.data(this,"plugin_"+n,null)})):void 0},t[n]=function(i){var s=t(e);return s.stellar.apply(s,Array.prototype.slice.call(arguments,0))},t[n].scrollProperty=a,t[n].positionProperty=l,e.Stellar=o}(jQuery,this,document);

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.