jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Removing all tabs's error.

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Removing all tabs's error. #64726

    sulwon
    Participant

    Hello JQWidgets Team,

    I’m testing jqxTabs functionality for ‘addLast’ and ‘removeAt’ methods.
    I’m adding over 5 tabs dynamically, it’s working OK.
    I’m trying to remove all tabs except the first tab, the error I keep getting is, “Uncaught TypeError: Cannot read property ‘css’ of undefined => jqxtabs.js:7”.
    When I’m removing tab one by one, it’s ok.
    I’m not sure what I’m doing wrong.

    Here’s the code:

    
    var tabsCount = $("#tabs").jqxTabs('length');
    for (var i = tabsCount-1; i > 0; i--) {
    
    		$("#tabs").jqxTabs('removeAt', i);
    
    };
    
    

    Regards,
    sulwon.

    Removing all tabs's error. #64738

    Peter Stoev
    Keymaster

    Hi sulwon,

    Here’s a demo which shows how to remove tabs in a loop: http://jsfiddle.net/q9qsp78u/

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.