can't you just put your site in a wrapper div and give it the css property of margin:0 auto
no need for javascript to center a site.

OscarGodson wrote:
I'm writing a site in a lot of javascript that has a lot of effects. I'm
really trying to push the limits on jQuery. Right now my site has animated
background image that moves slowly moves up, multiple clouds moving across
the sky then loops around again, animated content area (when you click on an
image, it fades out the images and fades in the corresponding content),
bouncing tabs when you hover on them and I have it center my website wrapper
due to the many layers of the site.

The problem is that when I'm not on the site Firefox's memory usage (looking
at ONLY this webpage) 108mb and when I view my site it jumps to 115mb.

But what I'm worried about is that my fan speeds go from 3989RPMS (before
viewing site) to 4727RPMS.

That's over 730RPMS+ faster! :confused:

I think it's because of this piece of code that recenters my site

function absoluteCenter(){
        var window_size = $(window).width();
        var wrapper_width = $('#wrapper').width();
        var center_it = ((window_size/2)-(wrapper_width/2));
        $('#wrapper').css({left:center_it+'px'});
        setTimeout('absolute_center()',1); // <---- I think it's this!
}


How else can I get Firefox to not have a delay when a user resizes the
browser window? Safari doesn't need that last line and updates right away,
but firefox can have up to a full 2-3 second delay at times!

Reply via email to