hi,
this is the code i get the window size (width) when the page is ready.
Code:
$(document).ready(function(){
var height_window = $(window).height();
var width_window = $(window).width();
var margin_left = (width_window/2) - (840/2);
$('.slide').css({width:width_window+'px'});
$('.content').css({marginLeft:margin_left+'px'});
$('#enter').click(function () {
$('#container').animate({marginLeft:'-'+width_window+'px'}, 600);
return false;
});
$('#back').click(function () {
$('#container').animate({marginLeft:'0px'}, 600);
return false;
});
});
ideally, i hope to get the window size as well when you make the window smaller by dragging it... what event should i be using then??
this is the implimentation of the entire code,
http://partexchangeco.org.uk/home.php
many thanks,
Lau