Why is the ui-state-disabled function applied to my elements dynamically?

I have an add button to add new tabs. The list of tabs can also be sorted.

When a button is pressed to add a new tab, "ui-state-disabled" is dynamically added. This is pretty annoying.

The add button is part of the tab. I dynamically add it after displaying the tabs.

$('#tabs').append('<li id="tab-add" class="noSort"><a href="#" alt="Add Tab" title="Add Tab" class="add-tab"></a></li>');

Is there a reason ui-state-disabled is disabled, and can I disable it?

In firebug I can clearly see that after noSort ui-state-disabled has been added.

Thank.

+3
source share
2 answers

There is no attribute href( #) in your tab , which makes the jQuery-UI method tabs()to disable it:

https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.tabs.js#L264

+6

$ ( "# your ul id > li: has (href))" ). removeClass ( "ui-state-default ui-corner-top" ). css ( "font-weight", "normal" );

-1

All Articles