EasyUI Forum
May 08, 2024, 07:14:35 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: How to know the last visited tab  (Read 3048 times)
JPi
Newbie
*
Posts: 18


View Profile Email
« on: November 03, 2016, 12:40:47 AM »

Hi,

I have 4 tabs on my main screen say A,B,C,D. I need to perform some action if the last visited tab was C. So what is the code to check and perform some logic if last visited tab is C prior to navigating to the current selected tab of user.

Thanks,
JPi
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 03, 2016, 07:03:52 AM »

When a tab panel is selected, the 'onSelect' event fires.
Code:
$('#tt').tabs({
  onSelect: function(title,index){
    // detect if the selected tab panel is what you want
    if (...){
      // do something here
    }
  }
});
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!