Is it possible to change a div
\'s width live with jQuery? And if it is, how?
What I want is to change its width depending on the browser\'s window width
There are two ways to do this:
CSS: Use width as %, like 75%, so the width of the div will change automatically when user resizes the browser.
Javascipt: Use resize event
$(window).bind('resize', function()
{
if($(window).width() > 500)
$('#divID').css('width', '300px');
else
$('divID').css('width', '200px');
});
Hope this will help you :)