http://jsfiddle.net/5CLUg/7/
, , : D
BTW , , , .
CREDIT TO: http://jsfiddle.net/rashomon/8vLQ9/
display: block;
position: absolute;
right: 70px;
width: 15px;
}
border-left: 2px dotted
height: 250px;
}
background-color:
width:15px;
height:15px;
border-radius: 50%;
position: relative;
left: -6px;
}
<body>
<div id="pull-chain"><div class="chain" style="padding-left: 0px; padding-right: 0px; margin-right: 0px;"></div><div class="handle" style="padding-right: 0px; margin-right: 0px;"></div></div>
</body>
$(document).ready(function() {
var $handle = $('.handle'),
$chain = $('.chain'),
$initHeight = 200; // Initial height
$chain.each(function() {
$.data(this, "realHeight", $(this).height()); // Create new property realHeight
}).css({ overflow: "hidden", height: $initHeight + 'px' });
$handle.toggle(function() {
$chain.animate({ height: $chain.data("realHeight") }, 600);
}, function() {
$chain.animate({ height: $initHeight}, 600);
});
});