开发者

Collapse all the tabs in a Accordion on jquery?

By using the Telerik Extensions for ASP.NET MVC, how can I hide all the Accordion Tabs on page loading up ? B开发者_StackOverflow社区y default, it will expand the first Accordion tab on page loading up! Thanks a lot!


Try this:

It will disable all the active (open) pane.

$('.accordion').accordion({
    active: false,
    collapsible: true            
});


View the jQuery, there is most likely an option to specify the tab to show; by default this is probably the first. You can override the behavior by adding additional jQuery.

If the accordion is a nested UL, the jQuery to hide all the nested UL elements would be like this:

$('ul.accordion ul').hide();

Be sure to place this after the jQuery that sets up the accordion functionality. Clicking any of the top LI should then show the nested UL.

The markup may be different, but the logic should be very similar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜