EasyUI Forum
April 29, 2024, 11:16:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to know if a tab is enabled/disabled?  (Read 5599 times)
r2ferna
Newbie
*
Posts: 21


View Profile
« on: May 09, 2014, 10:24:27 AM »

Hi,
In easyui-tabs class, How to know if a particular tab is enabled/disabled?

Let's say :
Code:
 
var enabled = $('#tt').tabs('isEnabled', tabIndex);
or
var disabled = $('#tt').tabs('isDisabled', 'tabTitle');

MTIA.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 09, 2014, 09:01:25 PM »

Please extend a new method to achieve this functionality.
Code:
$.extend($.fn.tabs.methods, {
isDisabled: function(jq, which){
return jq.tabs('getTab', which).panel('options').tab.hasClass('tabs-disabled');
}
})

To check if a tab panel is disabled, try this:
Code:
var disabled = $('#tt').tabs('isDisabled', tabIndex);
console.log(disabled);
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!