Manually activate tabs jquery ui 1.10.3

后端 未结 1 1054
醉酒成梦
醉酒成梦 2021-01-21 08:38

I am really getting mad, I searched through jquery ui doc and stackoverflow\'s questions (tons of questions) but I cannot figure out how to manually act

1条回答
  •  醉梦人生
    2021-01-21 09:03

    Use the following to activate the last tab.

    $("#stepBuilder").tabs({ active: -1 });
    

    I've created an example for you on jsfiddle.net.

    The API doc says about the activate option:

    active

    Type: Boolean or Integer Default: 0

    Which panel is currently open.

    Multiple types supported:

    Boolean: Setting active to false will collapse all panels. This requires the collapsible option to be true.

    Integer: The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.

    0 讨论(0)
提交回复
热议问题