EasyUI Forum
December 05, 2025, 06:30:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Something wrong with Tabs on: August 23, 2012, 06:29:15 PM
oh,no...My god.

But the panel really opened and closed soon..... just one click, the actions followed.

It seems that there are no problems with the code. When clicking the tab title of panel, the panel would be opened not closed.
2  General Category / EasyUI for jQuery / Re: Tab's property on: August 23, 2012, 03:04:19 AM
hi, i have problems with tabs .  See http://www.jeasyui.com/forum/index.php?topic=602.0

pls help me~ thank you


To select a special tab panel, please call 'select' method.
Code:
$('#tt').tabs('select', 1);  // select the second tab panel
3  General Category / EasyUI for jQuery / Re: Something wrong with Tabs on: August 22, 2012, 02:42:09 AM
i used the jquery-easyui-1.3.
4  General Category / EasyUI for jQuery / Something wrong with Tabs on: August 22, 2012, 02:40:37 AM

In my index.jsp, i used the tabs to show the content of tab1.jsp and tab2.jsp.

THE PROBLEM IS:

When i clicked the tabs(both tab1,tab2 ) the first time, the content would be shown in the center region, BUT closed at once automaticly.
and then it just work correctly.


Pls pay attention to the content in RED COLOR. Thank you very much and Look forward to your reply

the coding is following.

Code:
  <body class="easyui-layout" >
            <div region="west" split="true" title="" style="width:160px;">
    <p style="height:1px"></p>
        <ul>
            <li><a id="tab1" href="#" onclick="addTab('Tab1','tab1.jsp')">Tab1</a></li> 
            <li><a id="tab2" href="#" onclick="addTab('Tab2','tab2.jsp')">Tab2</a></li> 
            <li></li> 
           
        </ul>
    </div> 
   
    <div region="center" title="" style="padding:5px;background:#eee;">
    <div id="tabs" class="easyui-tabs" fit="true" border="false">
    <div title="Welcome" style="padding:20px;"> 
    <p>Welcome!</p>
     </div>
    </div>
    </div>
 </body>



There is a JS file, just like that.

Code:
function addTab(title, href) {
var tt = $('#tabs');
if (tt.tabs('exists', title)) {
tt.tabs('select', title);
} else {
if (href) {
var content = '<iframe scrolling="yes" frameborder="0"  src="' + href + '" style="width:100%;height:100%;padding:0px;"></iframe>';
} else {
var content = 'waiting';
}
tt.tabs('add', {
title : title,
closable : true,
content : content,
selected: true
});
}
};
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!