From ec79af4ed5388e535492dcfdade31b9b0f68982c Mon Sep 17 00:00:00 2001 From: Mark Dalgleish Date: Fri, 6 Jan 2012 17:32:53 +1100 Subject: [PATCH] Update Chrome background rendering fix --- stellar.js | 18 ++++++++++-------- stellar.min.js | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/stellar.js b/stellar.js index 5d76246..2c3a9e9 100644 --- a/stellar.js +++ b/stellar.js @@ -181,16 +181,18 @@ this._findBackgrounds(); // Fix for Chrome background rendering bug - setTimeout(function(){ - var oldLeft = self._getScrollLeft(), - oldTop = self._getScrollTop(); + if (navigator.userAgent.indexOf('Chrome') > 0) { + $(window).load(function(){ + var oldLeft = self._getScrollLeft(), + oldTop = self._getScrollTop(); - self._setScrollLeft(oldLeft + 1); - self._setScrollTop(oldTop + 1); + self._setScrollLeft(oldLeft + 1); + self._setScrollTop(oldTop + 1); - self._setScrollLeft(oldLeft); - self._setScrollTop(oldTop); - }, 5); + self._setScrollLeft(oldLeft); + self._setScrollTop(oldTop); + }); + } }, _findParticles: function(){ var self = this, diff --git a/stellar.min.js b/stellar.min.js index a9b12c5..7a2e150 100644 --- a/stellar.min.js +++ b/stellar.min.js @@ -3,4 +3,4 @@ * * This content is released under the MIT License * markdalgleish.mit-license.org - */(function(a,b,c,d){function l(b,c){this.element=b,this.options=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="stellar",f={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,viewportDetectionInterval:1e4,hideElement:function(a){a.hide()},showElement:function(a){a.show()}},g={scroll:{getTop:function(a){return a.scrollTop()},setTop:function(a,b){a.scrollTop(b)},getLeft:function(a){return a.scrollLeft()},setLeft:function(a,b){a.scrollLeft(b)}},position:{getTop:function(a){return parseInt(a.css("top"),10)*-1},setTop:function(a,b){a.css("top",b)},getLeft:function(a){return parseInt(a.css("left"),10)*-1},setLeft:function(a,b){a.css("left",b)}},margin:{getTop:function(a){return parseInt(a.css("margin-top"),10)*-1},setTop:function(a,b){a.css("margin-top",b)},getLeft:function(a){return parseInt(a.css("margin-left"),10)*-1},setLeft:function(a,b){a.css("margin-left",b)}},transform:{getTop:function(a){return a.css(i+"transform")!=="none"?parseInt(a.css(i+"transform").match(/(-?[0-9]+)/g)[5],10)*-1:0},setTop:function(a,b){j(a,b,"Y")},getLeft:function(a){return a.css(i+"transform")!=="none"?parseInt(a.css(i+"transform").match(/(-?[0-9]+)/g)[4],10)*-1:0},setLeft:function(a,b){j(a,b,"X")}}},h={position:{setTop:function(a,b){a.css("top",b)},setLeft:function(a,b){a.css("left",b)}},transform:{setTop:function(a,b,c){j(a,b-c,"Y")},setLeft:function(a,b,c){j(a,b-c,"X")}}},i=function(){var b="";a.browser.webkit?b="-webkit-":a.browser.mozilla?b="-moz-":a.browser.opera?b="-o-":a.browser.msie&&(b="-ms-");return b}(),j=function(a,b,c){var d=a.css(i+"transform");d==="none"?a.css(i+"transform","translate"+c+"("+b+"px)"):a.css(i+"transform",k(d,/(-?[0-9]+[.]?[0-9]*)/g,c==="X"?5:6,b))},k=function(a,b,c,e){var f,g,h;if(a.search(b)===-1)return a;f=a.split(b),h=c*2-1;if(f[h]===d)return a;f[h]=e;return f.join("")};l.prototype={init:function(){this.options.name=e+"_"+Math.floor(Math.random()*1e4),this._defineElements(),this._defineGetters(),this._defineSetters(),this.refresh(),this._startViewportDetectionLoop(),this._startAnimationLoop()},_defineElements:function(){this.$scrollElement=a(this.element),this.$element=this.element===b?a("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==d?a(this.options.viewportElement):this.$scrollElement[0]===b?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var a=this;this._getScrollLeft=function(){return g[a.options.scrollProperty].getLeft(a.$scrollElement)},this._getScrollTop=function(){return g[a.options.scrollProperty].getTop(a.$scrollElement)}},_defineSetters:function(){var a=this;this._setScrollLeft=function(b){g[a.options.scrollProperty].setLeft(a.$scrollElement,b)},this._setScrollTop=function(b){g[a.options.scrollProperty].setTop(a.$scrollElement,b)},this._setLeft=function(b,c,d){h[a.options.positionProperty].setLeft(b,c,d)},this._setTop=function(b,c,d){h[a.options.positionProperty].setTop(b,c,d)}},refresh:function(){var a=this;this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),setTimeout(function(){var b=a._getScrollLeft(),c=a._getScrollTop();a._setScrollLeft(b+1),a._setScrollTop(c+1),a._setScrollLeft(b),a._setScrollTop(c)},5)},_findParticles:function(){var b=this,c=this._getScrollLeft(),e=this._getScrollTop();this.particles=[];!this.options.parallaxElements||this.$element.find("[data-stellar-ratio]").each(function(c){var e=a(this),f,g,h,i,j,k,l,m=0,n=0,o=0,p=0;b.options.showElement(e),e.data("stellar-startingLeft")===d?(e.data("stellar-startingLeft",e.css("left")),e.data("stellar-startingTop",e.css("top"))):(e.css("left",e.data("stellar-startingLeft")),e.css("top",e.data("stellar-startingTop"))),h=e.position().left,i=e.position().top,k=e.offset().left-parseInt(e.css("margin-left"),10),l=e.offset().top-parseInt(e.css("margin-top"),10),e.parents().each(function(){var b=a(this);if(b.data("stellar-offset-parent")===!0){m=o,n=p,j=b;return!1}o+=b.position().left,p+=b.position().top}),f=e.data("stellar-horizontal-offset")!==d?e.data("stellar-horizontal-offset"):j!==d&&j.data("stellar-horizontal-offset")!==d?j.data("stellar-horizontal-offset"):b.horizontalOffset,g=e.data("stellar-vertical-offset")!==d?e.data("stellar-vertical-offset"):j!==d&&j.data("stellar-vertical-offset")!==d?j.data("stellar-vertical-offset"):b.verticalOffset,b.particles.push({$element:e,$offsetParent:j,isFixed:e.css("position")==="fixed",horizontalOffset:f,verticalOffset:g,startingPositionLeft:h,startingPositionTop:i,startingOffsetLeft:k,startingOffsetTop:l,parentOffsetLeft:m,parentOffsetTop:n,stellarRatio:e.data("stellar-ratio")!==d?e.data("stellar-ratio"):1,width:e.outerWidth(!0),height:e.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var b=this,c=this._getScrollLeft(),e=this._getScrollTop(),f;this.backgrounds=[];!this.options.parallaxBackgrounds||(f=this.$element.find("[data-stellar-background-ratio]"),this.$element.is("[data-stellar-background-ratio]")&&f.add(this.$element),f.each(function(){var f=a(this),g=f.css("background-position").split(" "),h,i,j,k,l,m;l=f.offset().left-parseInt(f.css("margin-left"),10)-c,m=f.offset().top-parseInt(f.css("margin-top"),10)-e,h=f.data("stellar-horizontal-offset")!==d?f.data("stellar-horizontal-offset"):b.horizontalOffset,i=f.data("stellar-vertical-offset")!==d?f.data("stellar-vertical-offset"):b.verticalOffset,b.backgrounds.push({$element:f,isFixed:f.css("background-attachment")==="fixed",horizontalOffset:h,verticalOffset:i,startingValueLeft:g[0],startingValueTop:g[1],startingBackgroundPositionLeft:isNaN(parseInt(g[0],10))?0:parseInt(g[0],10),startingBackgroundPositionTop:isNaN(parseInt(g[1],10))?0:parseInt(g[1],10),startingPositionLeft:f.position().left,startingPositionTop:f.position().top,startingOffsetLeft:l,startingOffsetTop:m,stellarRatio:f.data("stellar-background-ratio")===d?1:f.data("stellar-background-ratio")})}))},_setOffsets:function(){var c=this;a(b).unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),typeof this.options.horizontalOffset=="function"?(this.horizontalOffset=this.options.horizontalOffset(),a(b).bind("resize.horizontal-"+this.name,function(){c.horizontalOffset=c.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,typeof this.options.verticalOffset=="function"?(this.verticalOffset=this.options.verticalOffset(),a(b).bind("resize.vertical-"+this.name,function(){c.verticalOffset=c.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var a=this._getScrollLeft(),b=this._getScrollTop(),c,d,e,f,g,h,i,j=!0,k=!0,l,m,n,o;if(this.currentScrollLeft!==a||this.currentScrollTop!==b||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){this.currentScrollLeft=a,this.currentScrollTop=b,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight;for(var p=this.particles.length-1;p>=0;p--)e=this.particles[p],f=e.isFixed?1:0,this.options.horizontalScrolling&&(l=(a+e.horizontalOffset+this.viewportOffsetLeft+e.startingPositionLeft-e.startingOffsetLeft+e.parentOffsetLeft)*-(e.stellarRatio+f-1)+e.startingPositionLeft,n=l-e.startingPositionLeft+e.startingOffsetLeft),this.options.verticalScrolling&&(m=(b+e.verticalOffset+this.viewportOffsetTop+e.startingPositionTop-e.startingOffsetTop+e.parentOffsetTop)*-(e.stellarRatio+f-1)+e.startingPositionTop,o=m-e.startingPositionTop+e.startingOffsetTop),this.options.hideDistantElements&&(k=!this.options.horizontalScrolling||n+e.width>(e.isFixed?0:a)&&n<(e.isFixed?0:a)+this.viewportWidth+this.viewportOffsetLeft,j=!this.options.verticalScrolling||o+e.height>(e.isFixed?0:b)&&o<(e.isFixed?0:b)+this.viewportHeight+this.viewportOffsetTop),k&&j?(e.isHidden&&(this.options.showElement(e.$element),e.isHidden=!1),this.options.horizontalScrolling&&this._setLeft(e.$element,l,e.startingPositionLeft),this.options.verticalScrolling&&this._setTop(e.$element,m,e.startingPositionTop)):e.isHidden||(this.options.hideElement(e.$element),e.isHidden=!0);for(var p=this.backgrounds.length-1;p>=0;p--)g=this.backgrounds[p],f=g.isFixed?0:1,h=this.options.horizontalScrolling?(a-g.horizontalOffset-this.viewportOffsetLeft-g.startingOffsetLeft-g.startingBackgroundPositionLeft)*(f-g.stellarRatio)+"px":g.startingValueLeft,i=this.options.verticalScrolling?(b-g.verticalOffset-this.viewportOffsetTop-g.startingOffsetTop-g.startingBackgroundPositionTop)*(f-g.stellarRatio)+"px":g.startingValueTop,g.$element.css("background-position",h+" "+i)}},_startViewportDetectionLoop:function(){var a=this,b=function(){var b=a.$viewportElement.offset();a.viewportWidth=a.$viewportElement.width(),a.viewportHeight=a.$viewportElement.height(),a.viewportOffsetTop=b!==null?b.top:0,a.viewportOffsetLeft=b!==null?b.left:0};b(),setInterval(b,this.options.viewportDetectionInterval)},_startAnimationLoop:function(){var a=this,c=function(){return b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a,c){b.setTimeout(a,1e3/60)}}();(function d(){c(d),a._repositionElements()})()}},a.fn[e]=function(b){var c=arguments;if(b===d||typeof b=="object")return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new l(this,b))});if(typeof b=="string"&&b[0]!=="_"&&b!=="init")return this.each(function(){var d=a.data(this,"plugin_"+e);d instanceof l&&typeof d[b]=="function"&&d[b].apply(d,Array.prototype.slice.call(c,1))})},a[e]=function(c){var d=a(b);return d.stellar.apply(d,Array.prototype.slice.call(arguments,0))},a[e].scrollProperty=g,a[e].positionProperty=h})(jQuery,window,document) \ No newline at end of file + */(function(a,b,c,d){function l(b,c){this.element=b,this.options=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="stellar",f={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,viewportDetectionInterval:1e4,hideElement:function(a){a.hide()},showElement:function(a){a.show()}},g={scroll:{getTop:function(a){return a.scrollTop()},setTop:function(a,b){a.scrollTop(b)},getLeft:function(a){return a.scrollLeft()},setLeft:function(a,b){a.scrollLeft(b)}},position:{getTop:function(a){return parseInt(a.css("top"),10)*-1},setTop:function(a,b){a.css("top",b)},getLeft:function(a){return parseInt(a.css("left"),10)*-1},setLeft:function(a,b){a.css("left",b)}},margin:{getTop:function(a){return parseInt(a.css("margin-top"),10)*-1},setTop:function(a,b){a.css("margin-top",b)},getLeft:function(a){return parseInt(a.css("margin-left"),10)*-1},setLeft:function(a,b){a.css("margin-left",b)}},transform:{getTop:function(a){return a.css(i+"transform")!=="none"?parseInt(a.css(i+"transform").match(/(-?[0-9]+)/g)[5],10)*-1:0},setTop:function(a,b){j(a,b,"Y")},getLeft:function(a){return a.css(i+"transform")!=="none"?parseInt(a.css(i+"transform").match(/(-?[0-9]+)/g)[4],10)*-1:0},setLeft:function(a,b){j(a,b,"X")}}},h={position:{setTop:function(a,b){a.css("top",b)},setLeft:function(a,b){a.css("left",b)}},transform:{setTop:function(a,b,c){j(a,b-c,"Y")},setLeft:function(a,b,c){j(a,b-c,"X")}}},i=function(){var b="";a.browser.webkit?b="-webkit-":a.browser.mozilla?b="-moz-":a.browser.opera?b="-o-":a.browser.msie&&(b="-ms-");return b}(),j=function(a,b,c){var d=a.css(i+"transform");d==="none"?a.css(i+"transform","translate"+c+"("+b+"px)"):a.css(i+"transform",k(d,/(-?[0-9]+[.]?[0-9]*)/g,c==="X"?5:6,b))},k=function(a,b,c,e){var f,g,h;if(a.search(b)===-1)return a;f=a.split(b),h=c*2-1;if(f[h]===d)return a;f[h]=e;return f.join("")};l.prototype={init:function(){this.options.name=e+"_"+Math.floor(Math.random()*1e4),this._defineElements(),this._defineGetters(),this._defineSetters(),this.refresh(),this._startViewportDetectionLoop(),this._startAnimationLoop()},_defineElements:function(){this.$scrollElement=a(this.element),this.$element=this.element===b?a("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==d?a(this.options.viewportElement):this.$scrollElement[0]===b?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var a=this;this._getScrollLeft=function(){return g[a.options.scrollProperty].getLeft(a.$scrollElement)},this._getScrollTop=function(){return g[a.options.scrollProperty].getTop(a.$scrollElement)}},_defineSetters:function(){var a=this;this._setScrollLeft=function(b){g[a.options.scrollProperty].setLeft(a.$scrollElement,b)},this._setScrollTop=function(b){g[a.options.scrollProperty].setTop(a.$scrollElement,b)},this._setLeft=function(b,c,d){h[a.options.positionProperty].setLeft(b,c,d)},this._setTop=function(b,c,d){h[a.options.positionProperty].setTop(b,c,d)}},refresh:function(){var c=this;this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),navigator.userAgent.indexOf("Chrome")>0&&a(b).load(function(){var a=c._getScrollLeft(),b=c._getScrollTop();c._setScrollLeft(a+1),c._setScrollTop(b+1),c._setScrollLeft(a),c._setScrollTop(b)})},_findParticles:function(){var b=this,c=this._getScrollLeft(),e=this._getScrollTop();this.particles=[];!this.options.parallaxElements||this.$element.find("[data-stellar-ratio]").each(function(c){var e=a(this),f,g,h,i,j,k,l,m=0,n=0,o=0,p=0;b.options.showElement(e),e.data("stellar-startingLeft")===d?(e.data("stellar-startingLeft",e.css("left")),e.data("stellar-startingTop",e.css("top"))):(e.css("left",e.data("stellar-startingLeft")),e.css("top",e.data("stellar-startingTop"))),h=e.position().left,i=e.position().top,k=e.offset().left-parseInt(e.css("margin-left"),10),l=e.offset().top-parseInt(e.css("margin-top"),10),e.parents().each(function(){var b=a(this);if(b.data("stellar-offset-parent")===!0){m=o,n=p,j=b;return!1}o+=b.position().left,p+=b.position().top}),f=e.data("stellar-horizontal-offset")!==d?e.data("stellar-horizontal-offset"):j!==d&&j.data("stellar-horizontal-offset")!==d?j.data("stellar-horizontal-offset"):b.horizontalOffset,g=e.data("stellar-vertical-offset")!==d?e.data("stellar-vertical-offset"):j!==d&&j.data("stellar-vertical-offset")!==d?j.data("stellar-vertical-offset"):b.verticalOffset,b.particles.push({$element:e,$offsetParent:j,isFixed:e.css("position")==="fixed",horizontalOffset:f,verticalOffset:g,startingPositionLeft:h,startingPositionTop:i,startingOffsetLeft:k,startingOffsetTop:l,parentOffsetLeft:m,parentOffsetTop:n,stellarRatio:e.data("stellar-ratio")!==d?e.data("stellar-ratio"):1,width:e.outerWidth(!0),height:e.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var b=this,c=this._getScrollLeft(),e=this._getScrollTop(),f;this.backgrounds=[];!this.options.parallaxBackgrounds||(f=this.$element.find("[data-stellar-background-ratio]"),this.$element.is("[data-stellar-background-ratio]")&&f.add(this.$element),f.each(function(){var f=a(this),g=f.css("background-position").split(" "),h,i,j,k,l,m;l=f.offset().left-parseInt(f.css("margin-left"),10)-c,m=f.offset().top-parseInt(f.css("margin-top"),10)-e,h=f.data("stellar-horizontal-offset")!==d?f.data("stellar-horizontal-offset"):b.horizontalOffset,i=f.data("stellar-vertical-offset")!==d?f.data("stellar-vertical-offset"):b.verticalOffset,b.backgrounds.push({$element:f,isFixed:f.css("background-attachment")==="fixed",horizontalOffset:h,verticalOffset:i,startingValueLeft:g[0],startingValueTop:g[1],startingBackgroundPositionLeft:isNaN(parseInt(g[0],10))?0:parseInt(g[0],10),startingBackgroundPositionTop:isNaN(parseInt(g[1],10))?0:parseInt(g[1],10),startingPositionLeft:f.position().left,startingPositionTop:f.position().top,startingOffsetLeft:l,startingOffsetTop:m,stellarRatio:f.data("stellar-background-ratio")===d?1:f.data("stellar-background-ratio")})}))},_setOffsets:function(){var c=this;a(b).unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),typeof this.options.horizontalOffset=="function"?(this.horizontalOffset=this.options.horizontalOffset(),a(b).bind("resize.horizontal-"+this.name,function(){c.horizontalOffset=c.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,typeof this.options.verticalOffset=="function"?(this.verticalOffset=this.options.verticalOffset(),a(b).bind("resize.vertical-"+this.name,function(){c.verticalOffset=c.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var a=this._getScrollLeft(),b=this._getScrollTop(),c,d,e,f,g,h,i,j=!0,k=!0,l,m,n,o;if(this.currentScrollLeft!==a||this.currentScrollTop!==b||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){this.currentScrollLeft=a,this.currentScrollTop=b,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight;for(var p=this.particles.length-1;p>=0;p--)e=this.particles[p],f=e.isFixed?1:0,this.options.horizontalScrolling&&(l=(a+e.horizontalOffset+this.viewportOffsetLeft+e.startingPositionLeft-e.startingOffsetLeft+e.parentOffsetLeft)*-(e.stellarRatio+f-1)+e.startingPositionLeft,n=l-e.startingPositionLeft+e.startingOffsetLeft),this.options.verticalScrolling&&(m=(b+e.verticalOffset+this.viewportOffsetTop+e.startingPositionTop-e.startingOffsetTop+e.parentOffsetTop)*-(e.stellarRatio+f-1)+e.startingPositionTop,o=m-e.startingPositionTop+e.startingOffsetTop),this.options.hideDistantElements&&(k=!this.options.horizontalScrolling||n+e.width>(e.isFixed?0:a)&&n<(e.isFixed?0:a)+this.viewportWidth+this.viewportOffsetLeft,j=!this.options.verticalScrolling||o+e.height>(e.isFixed?0:b)&&o<(e.isFixed?0:b)+this.viewportHeight+this.viewportOffsetTop),k&&j?(e.isHidden&&(this.options.showElement(e.$element),e.isHidden=!1),this.options.horizontalScrolling&&this._setLeft(e.$element,l,e.startingPositionLeft),this.options.verticalScrolling&&this._setTop(e.$element,m,e.startingPositionTop)):e.isHidden||(this.options.hideElement(e.$element),e.isHidden=!0);for(var p=this.backgrounds.length-1;p>=0;p--)g=this.backgrounds[p],f=g.isFixed?0:1,h=this.options.horizontalScrolling?(a-g.horizontalOffset-this.viewportOffsetLeft-g.startingOffsetLeft-g.startingBackgroundPositionLeft)*(f-g.stellarRatio)+"px":g.startingValueLeft,i=this.options.verticalScrolling?(b-g.verticalOffset-this.viewportOffsetTop-g.startingOffsetTop-g.startingBackgroundPositionTop)*(f-g.stellarRatio)+"px":g.startingValueTop,g.$element.css("background-position",h+" "+i)}},_startViewportDetectionLoop:function(){var a=this,b=function(){var b=a.$viewportElement.offset();a.viewportWidth=a.$viewportElement.width(),a.viewportHeight=a.$viewportElement.height(),a.viewportOffsetTop=b!==null?b.top:0,a.viewportOffsetLeft=b!==null?b.left:0};b(),setInterval(b,this.options.viewportDetectionInterval)},_startAnimationLoop:function(){var a=this,c=function(){return b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a,c){b.setTimeout(a,1e3/60)}}();(function d(){c(d),a._repositionElements()})()}},a.fn[e]=function(b){var c=arguments;if(b===d||typeof b=="object")return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new l(this,b))});if(typeof b=="string"&&b[0]!=="_"&&b!=="init")return this.each(function(){var d=a.data(this,"plugin_"+e);d instanceof l&&typeof d[b]=="function"&&d[b].apply(d,Array.prototype.slice.call(c,1))})},a[e]=function(c){var d=a(b);return d.stellar.apply(d,Array.prototype.slice.call(arguments,0))},a[e].scrollProperty=g,a[e].positionProperty=h})(jQuery,window,document) \ No newline at end of file