EasyUI Forum
May 09, 2024, 02:28:40 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: Recognize closable, not active, tab in 'onClose' event  (Read 6604 times)
Rimokas
Newbie
*
Posts: 12


View Profile Email
« on: November 23, 2014, 02:17:09 AM »

Hi,

I'm trying this excelent library. In tabs panels I'm loading html pages with ajax . All is working OK. Don't know how to recognize which tabs I'm closing in 'onClose' event then tab isn't active. Let say that I created 3 closable tabs and the last is active . And then I'm clicking on the first, not active, tab's close button. Don't know how to recognize that this is the first tab in 'onClose' event ... Sad

Thanks in advance !
Logged
Rimokas
Newbie
*
Posts: 12


View Profile Email
« Reply #1 on: November 23, 2014, 02:34:22 AM »

OK, found that ...  Smiley

Code:
		 $( '#mTab' ).tabs(
{
onBeforeClose: function( title, index )
{
   var tabs   = $( '#mTab' ).tabs( 'tabs' );
                           var tab_id = tabs[ index ].panel( 'options' ).id;
                           .. do some stuf ..
}
                  });


At first I didn't noticed that 'onBeforeClose' is receiving index. Works fine !  Grin
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!