I have a page with 3 content areas (divs with the class "section").
http://refreshperspective.com/CLIENTS/unboxed/products.html
I'm using JQuery to scroll horizontally to these three divs. The issue I am having is keeping the content in the div centered when the window is resized. I have been using the following code:
var wind = $(window).width();
$(".section").width(wind);
$(window).resize(function(){
var windRe = $(window).width();
$(".section").width(windRe);
});
This works perfectly on the first div that is loaded (the main screen) but fails when you scroll right to another of the three divs.
When these are resized the div moves away from the center (to the right when the window is resized out wider to the right, and vice versa). Any thoughts on how I could get the other two content areas to maintain their centering (should stay inline with the navigation at the bottom that is absolutely positioned) like the first loaded div would be awesome.