EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: msvabik on October 08, 2015, 03:56:54 AM



Title: change icon on Tab
Post by: msvabik on October 08, 2015, 03:56:54 AM
Hello
How is it possible to change the icon in the tab?
Code:
<div id="docs_tabs" class="easyui-tabs" fit="true" border="false" plain="false"
tabHeight="44" tabPosition="top" >
<div title="title1" id="docs_tab_1" style="padding:5px;"
data-options="iconCls:'icon-unloc',href:'getdata.php'">
</div>

I tried:
Code:
$('#docs_tab_1').panel('options').IconCls = 'icon-lock';
and it did not work.

Could someone tell me how to do that?


Title: Re: change icon on Tab
Post by: stworthy on October 08, 2015, 06:29:19 PM
Please call 'update' method to update the icon on a tab panel.
Code:
$('#docs_tabs').tabs('update', {
    tab: $('#docs_tab_1'),
    type: 'header',
    options:{
        iconCls: 'icon-lock'
    }
})


Title: Re: change icon on Tab
Post by: msvabik on October 12, 2015, 01:44:06 PM
Thank you very much it works great