Clear dom by changing tab

3 posts, 1 answers
  1. nicolas
    nicolas avatar
    7 posts
    Member since:
    Mar 2015

    Posted 27 Aug 2015 Link to this post

    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. Answer
    Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 31 Aug 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. nicolas
    nicolas avatar
    7 posts
    Member since:
    Mar 2015

    Posted 02 Sep 2015 Link to this post

    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,

Back to Top