开发者

Show all tab content in jQuery UI tabs

开发者 https://www.devze.com 2023-02-10 04:28 出处:网络
How can I sho开发者_如何学JAVAw all the panes in an \"all\" tab using jQuery UI tabs?I\'ve got a solution. What I did was:

How can I sho开发者_如何学JAVAw all the panes in an "all" tab using jQuery UI tabs?


I've got a solution. What I did was:

var user_tabs = $("#user-tabs").tabs({
    select: function(event, ui) {
        if (ui.index == 0) {
            $("div[id^=tabs-pane-]").show();
        } else {
            $("div[id^=tabs-pane-]").hide();
            $(ui.panel).show()
        }
    }
});


Have you tried to show all the divs in your main tab div ?

function ShowAll(){
  $('div#tabs div').show()
}

It could be a nice and simple solution.


The following will work.

$("div.ui-tabs-hide").removeClass("ui-tabs-hide");


for jquery ui tabs 1.12.1:

$("#user-tabs").tabs(
    {activate:
            function(event, ui) {
                if ( "do some checking here if the special show-all tab was selected") {
                    $("div[id^='tabs-pane-']").show();
                }
            }
        }
    )
0

精彩评论

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

关注公众号