How to get current tab title which i named in Jquery Tabs UI

后端 未结 6 543
温柔的废话
温柔的废话 2021-01-19 23:06

I\'m using http://jqueryui.com/demos/tabs/#manipulation. I want to get an title of current selected tab which I earlier named (e.g. from a href). How to get it?

I tr

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-20 00:04

    Alternative way to get tab title:

    var selected = $("#tabs").tabs( "option", "selected" );
    var selectedTabTitle = $($("#tabs li")[selected]).text();
    

提交回复
热议问题