JQuery collapsable Panel
How does the Jquery use to create similar to Ajax开发者_运维百科 CollapsiblePanel?
Manually: Have a div for the header (which will be clicked to expand and collapse), and another div for the content (which will have the matter to be displayed).
here's an example.
//To Show
$('#myheader1').click(function(){$('#mycontent1').Show())};
//To Show
$('#myheader1').click(function(){$('#mycontent1').Hide())};
You'll have to maintain the visibility status in a variable.
Ready control
http://plugins.jquery.com/project/accordion
Try this:
<ItemTemplate>
<span class="title">Show/Hide</span>
<div>
<!-- put some elements here... -->
</div>
</ItemTemplate>
$(".title").click(function() { $(this).next("div").slideToggle("slow"); });
精彩评论