This HTML code is very simple. We created Tabs with a tab panel named 'Home'. Note that we don't need to write any JavaScript code.
#### Step 2: Implement the 'addTab' Function
function addTab(title, url){if ($('#tt').tabs('exists', title)){$('#tt').tabs('select', title);} else {var content = '';$('#tt').tabs('add',{title:title,content:content,closable:true});}}
We use the 'exists' method to check if the tab already exists. If it does, we activate it. If not, we call the 'add' method to add a new tab panel.
## Download jQuery EasyUI Example
[jeasyui-layout-tabs2.zip](#)
Jeasyui Layout Tabs2
# jQuery EasyUI Layout - Dynamically Adding Tabs
You can easily add Tabs by using jQuery EasyUI. You only need to call the 'add' method.
In this tutorial, we will use iframes to dynamically add Tabs displayed on a page. When the add button is clicked, a new tab will be added. If the tab already exists, it will be activated.
!(#)
#### Step 1: Create Tabs
YouTip