forked from sahdev50/SortingAlgorithmVisualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp2.js
More file actions
36 lines (32 loc) · 1.58 KB
/
app2.js
File metadata and controls
36 lines (32 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$("#btn1").click(function() {
$("#btn2").prop('disabled', !$("#btn2").prop("disabled"))
document.getElementById("btn2").style.color = "red";
$("#btn3").prop('disabled', !$("#btn3").prop("disabled"))
document.getElementById("btn3").style.color = "red";
$("#btn4").prop('disabled', !$("#btn4").prop("disabled"))
document.getElementById("btn4").style.color = "red";
});
$("#btn2").click(function() {
$("#btn1").prop('disabled', !$("#btn1").prop("disabled"))
document.getElementById("btn1").style.color = "red";
$("#btn3").prop('disabled', !$("#btn3").prop("disabled"))
document.getElementById("btn3").style.color = "red";
$("#btn4").prop('disabled', !$("#btn4").prop("disabled"))
document.getElementById("btn4").style.color = "red";
});
$("#btn3").click(function() {
$("#btn2").prop('disabled', !$("#btn2").prop("disabled"))
document.getElementById("btn2").style.color = "red";
$("#btn1").prop('disabled', !$("#btn1").prop("disabled"))
document.getElementById("btn1").style.color = "red";
$("#btn4").prop('disabled', !$("#btn4").prop("disabled"))
document.getElementById("btn4").style.color = "red";
});
$("#btn4").click(function() {
$("#btn2").prop('disabled', !$("#btn2").prop("disabled"))
document.getElementById("btn2").style.color = "red";
$("#btn3").prop('disabled', !$("#btn3").prop("disabled"))
document.getElementById("btn3").style.color = "red";
$("#btn1").prop('disabled', !$("#btn1").prop("disabled"))
document.getElementById("btn1").style.color = "red";
});