jQuery animate change content width
jQuery animate change content width
HTML
<a class="handle">button</a>
<div id="scribblar"></div>
CSS
a {
padding:10px;
cursor:pointer;
background:#000;
color:#fff;}
#scribblar{
background:#f60;
width:43px;
height:80px;}
JavaScript
$(document).ready(function($) {
$('.handle').toggle(function(){
$('#scribblar').animate({'width': '100px'}, 400);
}, function(){
$('#scribblar').animate({'width': '43px'},400);
});
});