]> cgit.babelmonkeys.de Git - adhocweb.git/blobdiff - js/main.js
Use .empty() instead off removing childs
[adhocweb.git] / js / main.js
index 3c42647592beb91644d684c169fc7af0a459ed29..8724764fc49cb711496bb102ebd044a48c171df8 100644 (file)
@@ -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 = $("<input type='button' value='Start over'/>").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);