EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 10:39:34 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
tab + refresh
Pages: [
1
]
« previous
next »
Print
Author
Topic: tab + refresh (Read 4269 times)
rezzonico
Full Member
Posts: 184
tab + refresh
«
on:
February 18, 2021, 08:45:35 AM »
I refresh the second tab (index = 1) with the following code:
$('#tt').tabs('getTab', 1).panel('refresh');
The problem is that I want to refresh the tab only if it has already been selected by the user.
How can I verify this ?
It may be that I need to verify the length of the tab content ...
<div id="tt" class="easyui-tabs" border="true">
<div title="AAA" href="aaa.html"></div>
<div title="BBB" href="bbb.html"></div>
</div>
Thanks for any help.
Miche
«
Last Edit: February 18, 2021, 08:49:08 AM by rezzonico
»
Logged
jarry
Administrator
Hero Member
Posts: 2264
Re: tab + refresh
«
Reply #1 on:
February 18, 2021, 11:53:25 PM »
Listen to the 'onSelect' event on the tabs component and you can decide whether to refresh the selected tab panel or not.
Code:
$('#tt').tabs({
onSelect: function(title,index){
$('#tt').tabs('getTab',index).panel('refresh');
}
})
Logged
rezzonico
Full Member
Posts: 184
Re: tab + refresh
«
Reply #2 on:
February 24, 2021, 01:40:20 AM »
Thanks !
Regards
Miche
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...