jQuery UI Widgets Forums Dialogs and Notifications Window Remove all html source

This topic contains 3 replies, has 2 voices, and was last updated by  Makla 10 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Remove all html source #18006


    I am loading jqxWindows from server via ajax. I try to placed them inside div:

    var div = $('<div id="window-container-' + name + '">');
    $("#" + Settings.WindowsContainer).append(div);
    var request = $.get(win.Url, function(data)
    return {Request: request};

    But only javascript is placed inside newly created div. Everything else (jqxWindow, jqx-menu-wraper, listbox) is appended to body.
    I am loading a lot of windows from server and at one point I want to remove html source for old windows.
    My idea was to delete the whole div element and everything that was loaded from server. That’s why I am trying to append it to div.
    I could remove windows myself, but there are also some jqx-menu-wrapper and listbox that appears as body childs. (Others: input, grid, button, checkbox are placed inside window div.)
    Can you correct this that all childs source is placed inside Window div.
    Or better correct that jqwidgets can be placed inside other html element than body.

    • This topic was modified 10 years, 6 months ago by  Peter Stoev. Reason: Moved to Window Forum
    Remove all html source #18044


    Hello Makla,

    We recommend using the widgets’ destroy methods to remove their respective HTML from the DOM.

    Best Regards,

    jQWidgets team

    Remove all html source #20824


    Apparently Destroy removes any childs html from DOM, but not the Window itself. Is this correct?
    To do that I need to manually remove

    <div id="window1">

    from body, or there is another way?

    • This reply was modified 10 years, 4 months ago by  Makla.
    Remove all html source #20914


    I am sorry. My mistake. It does clear all sources.
    Works as expected. 🙂

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

You must be logged in to reply to this topic.