From f4cb3215b33bff04fce978513f77aff1e621a1ff Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Thu, 26 Aug 2010 20:24:20 +0200 Subject: [PATCH] Use .empty() instead off removing childs --- js/main.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/main.js b/js/main.js index 3c42647..8724764 100644 --- a/js/main.js +++ b/js/main.js @@ -1,5 +1,4 @@ var BOSH_SERVICE = 'http://localhost:5280/http-bind/'; - var show_log = false; Strophe.addNamespace("ADHOC", "http://jabber.org/protocol/commands"); @@ -164,7 +163,7 @@ function serializeToDataform(form, st) { function displayResult(result) { var status = $(result).find("command").attr("status"); - $("#output *").remove(); + $("#output").empty(); $(result).find("command > *").each(function(index, e) { if ($(e).is("note")) { addNote("#output", $(e).text(), $(e).attr("type")); @@ -198,7 +197,7 @@ function displayResult(result) { }); } else { input = $("").bind("click", function() { - $('#output *').remove(); + $('#output').empty(); sessionid = null; cmdNode = null; getCommandNodes(); @@ -249,7 +248,7 @@ function showConnect() { pass.show(); jid.show(); $('label').show(); - $('#output *').remove(); + $('#output').empty(); return false; } @@ -285,7 +284,7 @@ $(document).ready(function () { if (button.value == 'connect') { showDisconnect(); - $('#log *').remove(); + $('#log').empty(); connection.connect(localJID, pass.get(0).value, onConnect); -- 2.39.2