EasyUI Forum
May 05, 2024, 05:37:41 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: Is dynamic tab title possible ?  (Read 3366 times)
JPi
Newbie
*
Posts: 18


View Profile Email
« on: October 13, 2016, 09:19:34 PM »

Hi,

I have a scenario where there are 3 tabs. Eg. Inbox, LeaveApply and HolidayList.

In Inbox tab, there is a datagrid showing list of new mails and the count of unread mails need to be displayed in bracket like Inbox (5) which means there are 5 unread mails. While a user works on LeaveApply tab and the user's unread mailbox count increases to 7 then how to dynamically display Inbox (7) without navigating to Inbox tab. I need to show dynamic title for Inbox while working on other tabs.

Is this possible and if so how ?

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


View Profile Email
« Reply #1 on: October 14, 2016, 12:10:17 AM »

You can call 'update' method to update the title of a specified tab panel.
Code:
var t = $('#tt');  // the tabs object
var tab = t.tabs('getTab', 0);  // the first tab panel i.e. Inbox
t.tabs('update', {
  tab: tab,
  options: {
    type: 'header',
    title: 'Inbox(5)'
  }
});
Logged
JPi
Newbie
*
Posts: 18


View Profile Email
« Reply #2 on: October 14, 2016, 02:20:43 AM »

Thanks stworthy. I shall try it.
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!