bretwalters13
02-09-2011, 08:43 AM
This seems to be "the unsolvable" problem. I have posted this on a bunch of forums and no one seems to know the answer...so this is my last try. I hope someone here has the magic answer. I will reward someone if they can figure this out. (20 bucks paypal or somethin..seriously)
Okay so if you visit www.ikrospro.com with a webkit based browser (i am seeing the problem in Chrome and Safari, but not in firefox or IE 8) upon load the site should auto scroll to the first "page" area called "the beginning". It works so perfect in Firefox and IE 8 and it works upon refresh sometimes in Chrome or Safari but never on the first load. Anyone have any idea why this would be? Heres the top part of my init file where it should handle the function first. I know there are some vimeo iframe errors in the console but even with the vimeo movies removed and before they were on the site, i was having the same problem.
$(document).ready(function() {
//SET SCROLL
var framesize_height = 720;
var framesize_width = 1140;
var window_width = $(window).width();
var window_height = $(window).height();
var new_width = (window_width - framesize_width)/2;
var new_height = (window_height - framesize_height)/2;
if(new_width <0){new_width = 0;}
if(new_height <0){new_height = 0;}
$.scrollTo( '#page_1', 0, {offset: {top:-new_height, left:-new_width} });
Thanks so much! If anyone solves this mystery I will be forever thankful! (serious client haha)
Appreciate it!
-Bret
Okay so if you visit www.ikrospro.com with a webkit based browser (i am seeing the problem in Chrome and Safari, but not in firefox or IE 8) upon load the site should auto scroll to the first "page" area called "the beginning". It works so perfect in Firefox and IE 8 and it works upon refresh sometimes in Chrome or Safari but never on the first load. Anyone have any idea why this would be? Heres the top part of my init file where it should handle the function first. I know there are some vimeo iframe errors in the console but even with the vimeo movies removed and before they were on the site, i was having the same problem.
$(document).ready(function() {
//SET SCROLL
var framesize_height = 720;
var framesize_width = 1140;
var window_width = $(window).width();
var window_height = $(window).height();
var new_width = (window_width - framesize_width)/2;
var new_height = (window_height - framesize_height)/2;
if(new_width <0){new_width = 0;}
if(new_height <0){new_height = 0;}
$.scrollTo( '#page_1', 0, {offset: {top:-new_height, left:-new_width} });
Thanks so much! If anyone solves this mystery I will be forever thankful! (serious client haha)
Appreciate it!
-Bret