My script:
compareResultTabId = -1;
$('#jqxTabs').jqxTabs({ width: '100%', height: '100%', position: 'bottom'});
$('#jqxTabs').on('add', function(event) {
compareResultTabId = event.args.item;
$('#jqxTabs').jqxTabs('showCloseButtonAt', compareResultTabId);
});
$('#jqxTabs').jqxTabs('addLast', 'CompareLast', '<div id="compareResult">Test content</div>');
My HTML:
<div id='jqxTabs'>
<ul>
<li> </li>
</ul>
<div>
<div id="productBom" style="margin-left: 2px; margin-top: 2px;">
</div>
</div>
</div>
My problem:
The second tab (CompareResult)’s tabId is 1, and it doesn’t show close button