I am trying to use jqxTabs to allow the user to dynamically generate tabs.
I know when first calling jqxTabs, you need to have one tab with content so I have been removing that tab after displaying the form containing the tabs object.
The workflow looks like this
1. remove first tab if exists
2. open jqxwindow for loading indicator
3. display hidden form containing tabs object
4. allow the user to add and remove tabs
5. when the user is done, removing any and all tabs
6. hide the form.
7. wait for further interaction.
In order to remove all tabs, I have to do the following
1. remove all but the first tabs.
2. call removeFirst inside setTimeout
This suppresses one error.
Often, when I am initially opening the form, I am receiving the following error
TypeError: Cannot read property ‘offsetLeft’ of undefined
Having one tab is necessary in jqxTabs, otherwise it will be in broken state. Its header height is calculated depending on the height of the tabs. I suggest you to hide it with CSS if it is necessary for your application scenario.