I am looking for a jQuery plug-in which will show / hi开发者_如何学Cde a div in a very smooth & slide manners when I click on a link.
Do anyone have any idea or URL? Thanks.
See demo here :)
You can simply do like:
<style type="text/css">
#dv {
width:100px;
height:100px;
}
</style>
<a href="#" id="link">Slide Div</a>
<div id="dv">Some Content</div>
<script type="text/javascript">
$(function(){
$('#link').click(function(){
$('#dv').slideToggle('slow');
return false;
});
});
</script>
You don't need plugins for that; that's supported in jQuery out of the box:
$('#myLink').click(function() {
$('#myDiv').slideToggle('fast');
}
精彩评论