I made an expandable div with jQuery so in my css the div is 250px width and when i expand it is animated to 500px.
How can i make it responsive? I mean when the div is "open" i want it so that when the user resizes his window the div resizes with it and also when the user clicks open on the div it opens depending within the window's
size.
Here is my code:
$('.button').click(function(){
$('.content').animate({width: "500px",}, 500);
setTimeout(function(){
$('.content').animate({top: "-400px", marginBottom: "0px", height:"1000px"}, 500);
},500);
});
.content{
width:250px;
}