EasyUI Forum
May 21, 2024, 12:29:28 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: get the title of a tab?  (Read 10994 times)
jpierce
Jr. Member
**
Posts: 73


View Profile
« on: July 03, 2013, 03:50:09 PM »

I'm trying to figure out how to get the title of a tab, for example the selected tab (though it could be any tab).  There appears to be no function to do it.  All I can think of is some kludge where I keep track of all the tab names independently of the tabs.  Is there some other way?  If not, can this be added?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 03, 2013, 06:43:19 PM »

To get the tab panel's title, the tab panel object should be retrieved first and then call panel's 'options' method to get its 'title' property.
Code:
var p = $('#tt').tabs('getSelected');  // get the selected tab panel
var title = p.panel('options').title;
alert(title);
Logged
jpierce
Jr. Member
**
Posts: 73


View Profile
« Reply #2 on: July 10, 2013, 12:49:28 PM »

Thanks!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!