Skip to content

Commit

Permalink
IE was barfing without the var in front of self!?!?
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Robbin committed Jan 20, 2010
1 parent bbe5efa commit 903d838
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jquery.backstretch.js
Expand Up @@ -37,7 +37,7 @@
.appendTo(wrap),
img = $("<img />").attr("src", src)
.bind("load", function() {
self = $(this);
var self = $(this);
imgRatio = self.width() / self.height();
_adjustBG(function() {
if( settings.hideUntilReady )
Expand Down
2 changes: 1 addition & 1 deletion jquery.backstretch.min.js
Expand Up @@ -8,4 +8,4 @@
* Dual licensed under the MIT and GPL licenses.
*/

(function(a){a.backstretch=function(g,c,h){var d={hideUntilReady:true,speed:0},b;if(c&&typeof c=="object"){a.extend(d,c)}a(document).ready(e);return this;function e(){if(g){var i={left:0,top:0},l=a("<div />").attr("id","backstretch-wrap").css(a.extend(i,{position:"absolute",zIndex:-1})),j=a("<div />").attr("id","backstretch").css(a.extend(i,{position:"fixed",overflow:"hidden",zIndex:-1})).appendTo(l),k=a("<img />").attr("src",g).bind("load",function(){self=a(this);b=self.width()/self.height();f(function(){if(d.hideUntilReady){self.fadeIn(d.speed,function(){if(typeof h=="function"){h()}})}})});if(d.hideUntilReady){k.hide()}k.appendTo(j);a("body").prepend(l);a(window).resize(f)}}function f(k){var j=a(window).width(),i=j/b;if(i<a(window).height()){i=a(window).height();j=i*b}a("#backstretch img").width(j).height(i);if(typeof k=="function"){k()}}}})(jQuery);
(function(a){a.backstretch=function(g,c,h){var d={hideUntilReady:true,speed:0},b;if(c&&typeof c=="object"){a.extend(d,c)}a(document).ready(e);return this;function e(){if(g){var i={left:0,top:0},l=a("<div />").attr("id","backstretch-wrap").css(a.extend(i,{position:"absolute",zIndex:-1})),j=a("<div />").attr("id","backstretch").css(a.extend(i,{position:"fixed",overflow:"hidden",zIndex:-1})).appendTo(l),k=a("<img />").attr("src",g).bind("load",function(){var self=a(this);b=self.width()/self.height();f(function(){if(d.hideUntilReady){self.fadeIn(d.speed,function(){if(typeof h=="function"){h()}})}})});if(d.hideUntilReady){k.hide()}k.appendTo(j);a("body").prepend(l);a(window).resize(f)}}function f(k){var j=a(window).width(),i=j/b;if(i<a(window).height()){i=a(window).height();j=i*b}a("#backstretch img").width(j).height(i);if(typeof k=="function"){k()}}}})(jQuery);

0 comments on commit 903d838

Please sign in to comment.