From: Florian Zeitz Date: Thu, 26 Aug 2010 18:24:20 +0000 (+0200) Subject: Use .empty() instead off removing childs X-Git-Url: https://cgit.babelmonkeys.de/?a=commitdiff_plain;h=f4cb3215b33bff04fce978513f77aff1e621a1ff;hp=907bec3b47789820c53a68559c5ca15d9f899bec;p=adhocweb.git Use .empty() instead off removing childs --- 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);