EasyUI Forum
February 22, 2020, 11:48:16 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: Changing tab icon after AJAX page load  (Read 181 times)
Aod47
Jr. Member
**
Posts: 63


View Profile
« on: February 14, 2020, 08:06:50 PM »

Hello,

From this topic
https://www.jeasyui.com/forum/index.php?topic=8206


Which a panel I called from AJAX. Sometime wait to long.
So, I tried to changed icon to icon-loading and add event onLoad
for change to real icon that I want to display.

But the icon not change.  Huh

Code:
<div id="TabpanelBib" class="easyui-tabs" data-options="fit:true,plain:true,tabPosition:'right',headerWidth:40,tabHeight:40,border:false">
                        <div iconCls="icon-bricks" data-options="tip:'Items'">
                            <div id="TabBibItems" class="easyui-panel" style="width:100%;height:100%;border:none;overflow:hidden;border-left:solid 1px #d3d3d3;padding: 5px 5px 5px 6px;"></div>
                        </div>
                        <div id="tbBibCard" iconCls="icon-loading" data-options="tip:'Bibliographic Card'" >
                            <div id="TabBibCard" class="easyui-panel" data-options="onLoad:function(){$('#tbBibCard').attr('iconCls', 'icon-attributes');}" style="width:100%;height:100%;border:none;border-left:solid 1px #d3d3d3;padding: 5px 5px 5px 6px;"></div>
                        </div>
                        <div iconCls="icon-form" data-options="tip:'MARC Form'">
                            <div id="TabBibForm" class="easyui-panel" style="width:100%;height:100%;border:none;overflow:hidden;border-left:solid 1px #d3d3d3;padding: 5px 5px 2px 6px;"></div>
                        </div>
                        <div iconCls="icon-cog1" data-options="tip:'Record Config'">
                            <div id="TabBibConfig" class="easyui-panel" style="width:100%;height:100%;border:none;overflow:hidden;border-left:solid 1px #d3d3d3;padding: 5px 5px 5px 6px;"></div>
                        </div>
                    </div>

Could you please advice. Thank you very much.
Logged
Aod47
Jr. Member
**
Posts: 63


View Profile
« Reply #1 on: February 14, 2020, 08:47:04 PM »

Got It! Thank you.

Code:
onLoad:function(){$('#TabpanelBib').find('li:eq(1)').find('span:eq(1)').removeClass('icon-loading').addClass('icon-attributes');}
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!