Skip to content

Commit

Permalink
Fixed window resizing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Robbin committed Aug 5, 2010
1 parent e0aa2d4 commit f3f518b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.backstretch.js
Expand Up @@ -18,8 +18,7 @@
speed: 0 // fadeIn speed for background after image loads (e.g. "fast" or 500)
},
rootElement = ("onorientationchange" in window) ? $(document) : $(window), // hack to acccount for iOS position:fixed shortcomings
imgRatio, bgImg, bgWidth, bgHeight, bgOffset,
bgCSS = {left: 0, top: 0};
imgRatio, bgImg, bgWidth, bgHeight, bgOffset, bgCSS;

// Extend the settings with those the user has provided
if(options && typeof options == "object") $.extend(settings, options);
Expand Down Expand Up @@ -57,6 +56,7 @@
}

function _adjustBG(fn) {
bgCSS = {left: 0, top: 0}
bgWidth = rootElement.width();
bgHeight = bgWidth / imgRatio;

Expand Down

0 comments on commit f3f518b

Please sign in to comment.