Spaces:
Running
Running
Alfredo Villegas
commited on
Commit
•
31c7711
1
Parent(s):
325d2d4
DEV: prueba 2 de switch button
Browse files- static/js/windowHandler.js +9 -11
static/js/windowHandler.js
CHANGED
@@ -41,14 +41,7 @@ class WindowHandler{
|
|
41 |
this.recalcularTextarea();
|
42 |
$("#chat").html("");
|
43 |
}
|
44 |
-
|
45 |
-
let checkBox = document.querySelector(".switch input[type='checkbox']");
|
46 |
-
if (checkBox.checked) {
|
47 |
-
console.log("Switch is turned on.");
|
48 |
-
} else {
|
49 |
-
console.log("Switch is turned off.");
|
50 |
-
}
|
51 |
-
}
|
52 |
|
53 |
manejadorEnviar(){
|
54 |
let mensaje = $("#input-text").val();
|
@@ -160,7 +153,12 @@ class WindowHandler{
|
|
160 |
|
161 |
}
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
this.recalcularTextarea();
|
42 |
$("#chat").html("");
|
43 |
}
|
44 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
manejadorEnviar(){
|
47 |
let mensaje = $("#input-text").val();
|
|
|
153 |
|
154 |
}
|
155 |
|
|
|
|
|
|
|
156 |
}
|
157 |
+
function toggleSwitch() {
|
158 |
+
let checkBox = document.querySelector(".switch input[type='checkbox']");
|
159 |
+
if (checkBox.checked) {
|
160 |
+
console.log("Switch is turned on.");
|
161 |
+
} else {
|
162 |
+
console.log("Switch is turned off.");
|
163 |
+
}
|
164 |
+
}
|