EasyUI Forum
May 07, 2024, 01:57:50 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: Can I have Tabs without tabs?  (Read 9144 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: October 03, 2013, 03:45:30 AM »

Hi,

I would like to have Tabs that could work in this way.

On my page I have a table placed into one Tab (not closable).
I could like to press a button which will create new Tab close to initial one.

This is very easy, but is it possible to make 1st Tab don't look like Tab (hide Tab heading)? So user can see only table.
Tab label(heading) should appear when new Tab added. And disappear again when new Tab is closed.

Thanks!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 03, 2013, 07:13:32 AM »

Do you want the hiding and displaying header functionality? If so, extend the 'hideHeader' and 'showHeader' methods as below:
Code:
$.extend($.fn.tabs.methods, {
hideHeader: function(jq){
return jq.each(function(){
var header = $(this).children('div.tabs-header');
header.css('background-color','transparent');
header.find('div.tabs-wrap').hide();
$(this).tabs('resize');
});
},
showHeader: function(jq){
return jq.each(function(){
var header = $(this).children('div.tabs-header');
header.css('background-color','');
header.find('div.tabs-wrap').show();
$(this).tabs('resize');
});
}
});
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: October 03, 2013, 07:33:17 AM »

Hi,

This is exactly what I wad looking for!

Thanks you very much!

Btw, Can we expect this new methods be a part of 1.3.5 version with possibility make header hidden using HTML code?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: October 05, 2013, 06:21:40 PM »

These two methods will be integrated into next version. Also, the 'showHeader' property will be available to let users to determine if the tabs component is hidden or not. The updated tabs plugin can be downloaded from http://www.jeasyui.com/easyui/plugins/jquery.tabs.js.
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #4 on: October 10, 2013, 06:02:36 AM »

Perfect!
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!