This is a migrated thread and some comments may be shown as answers.

Clear dom by changing tab

2 Answers 142 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
nicolas
Top achievements
Rank 1
nicolas asked on 27 Aug 2015, 02:41 PM

Hi,

I have a "two levels" tabstrip :
- Level 1 with 4 tabs
- Level 2 with about 10 tabs, in each level 1 tabs

A menu / Submenu.

 

So, when we activate each entry (one by one), dom is huge and the browser (Chrome / Firefox and IE) "lags". 
When all tabs were activated, we can hardly navigate.

So, i want to clear the dom, when I activate a level 1 tab.

Is there a "clean solution" to do this ? All content, kendo object... Etc. have to be clear / destroy.

 

Many thanks,

Regards, 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 31 Aug 2015, 09:03 AM

Hello Nicolas,

clearing the DOM is relatively easy - you can call kendo.destroy on the element, and remove it from the DOM afterwards. However, I am not sure how you will subsequently restore the contents afterwards. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
nicolas
Top achievements
Rank 1
answered on 02 Sep 2015, 08:11 AM

Hello Petyo,

Yes, that did the trick, with kendo destroy and empty() method for last contentElement.

Except for kendo window widget, div element is still in ​DOM, so by refreshing a new identical div is created.

Il will remove them in script.

 

Many thanks,

Regards,

Tags
TabStrip
Asked by
nicolas
Top achievements
Rank 1
Answers by
Petyo
Telerik team
nicolas
Top achievements
Rank 1
Share this question
or