Skip to content

Commit 3435326

Browse files
author
Jake Blakeley
committed
fixed mobile bug
1 parent 2c4a059 commit 3435326

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed
Binary file not shown.

js/main.js

+14
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,25 @@ $(document).ready(function(){
328328
}, { queue: false, duration: 4400, easing: [0.39, 0.575, 0.565, 1]});
329329
} });
330330
}
331+
//fix vw/vh units on mobile safari and old browsers
332+
function fixVH(){
333+
var rightWidth = $("img.headerRight").width();
334+
var leftWidth = $("img.headerLeft").width();
335+
var centerWidth = $("img.headerCenter").width();
336+
$(".headerRightContainer").css({"width": rightWidth + "px"});
337+
$(".headerLeftContainer").css({"width": leftWidth + "px"});
338+
$(".headerCenterContainer").css({"width": centerWidth + "px"});
339+
}
331340

332341
$(window).load(function(){
342+
fixVH();
333343
headerAnimation();
334344
});
335345

346+
$(window).resize(function(){
347+
fixVH();
348+
});
349+
336350
//====================================//
337351
// Main Scrolling Events
338352
//====================================//

js/min/main-min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)