Close button for tabs in html initiation

Hi,

I am initiating the tabs using the html example

Content 1
Content 2
Content 3

How do i put the close button for the tabs?
I tried

   survey_design.enableTabCloseButton(true);

inside the load but it does not work? Any sugggestions guys

Sorry id’s are corrected.

Content 1
Content 2
Content 3

Hi
It must be called in doOnInit() function

Hi Darya,

thank you . I tried

$(document).ready(function(){


    survey_design.attachEvent("onXLS", function(){
        survey_design.enableTabCloseButton(true);
    });
   
});

But no success. I’m sorry I may have understood wrong ?

Sorry about that, I overlooked the code.
This is what i have now but still does not work
HTML:

<div id="design_box" class="dhtmlxTabBar" style="width:990px; height:1024px" oninit="design_boxdoOnInit()">
           <?  foreach ($survey->pages as $pageId => $page) : ?>
                <!-- start page -->
                <div id="<?=$pageId ?>" name="Page <?=$page->index ?> - <?=h($page->title) ?>" style="display: none;" >

</div>
<?  endforeach; ?>
</div>

and javascript:

function design_boxdoOnInit(){
    survey_design.enableTabCloseButton(true);
};

Any idea what could be wrong ?


Also, I was wondering if there is a way to make Add New+ look distinct (say different background color via css?

It will be much better for you to use other (not HTML) init for tabbar, and you will get this possibility (it is impossible in HTML loading mode) and will not have difficulties with “close” button