EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on October 16, 2015, 02:06:15 AM



Title: Disabling tab/tab header by parameter?
Post by: aswzen on October 16, 2015, 02:06:15 AM
Please see this fiddle
http://jsfiddle.net/mdu7hw8y/

I want to disable tab(tab header) for being selected but i want it to be disabled at first time rendered.
How to do that?

i know this code
$('#RIGHT_TABS').tabs('disableTab',2);
but i cannot guarantee to put this code in jquery document ready. I just want disable it by direct parameter, can i?

Thank you in advance


Title: Re: Disabling tab/tab header by parameter?
Post by: jarry on October 17, 2015, 01:38:14 AM
Please download patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.3-patch.zip and include to the page. To create a disabled tab panel, just set the 'disabled' property to true.
Code:
<div id="RIGHT_TABS" class="easyui-tabs" style="width:500px;height:250px;">
    <div title="GO ON" style="padding:20px">
        OK
    </div>
    <div title="GO ON 2" >
        OK
    </div>
    <div title="PLEASE DISABLE IT" data-options="iconCls:'icon-reload',disabled:true">
        IT SHOULD NOT BE ABLE TO SELECT
    </div>
</div>


Title: Re: Disabling tab/tab header by parameter?
Post by: aswzen on October 18, 2015, 07:52:17 PM
ok thankyou man.. :) 谢谢