Skip to content

Commit

Permalink
nambah notif error
Browse files Browse the repository at this point in the history
  • Loading branch information
mininxd authored Jan 15, 2024
1 parent c036cc9 commit 6d9425b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ $('#clearEl').on("click", function() {
$('#hasilEl').css("opacity","1");
$('#rumusEl').html("");
$('#hasilEl').html("");
}, 400)
}, 60)
})
//

Expand All @@ -91,5 +91,12 @@ var convertOperator = defineMulti.replace(/\b(?:÷|×)\b/gi, function(convert){

// console.log(convertOperator + "=" + eval(convertOperator));

try {
$('#hasilEl').html(eval(convertOperator));
$('#hasilEl').css("color", "black");
} catch (e) {
$('#hasilEl').html("Format Error");
$('#hasilEl').css("color", "red");
}
hitungRumus();
})
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
div.rumusContainer {
border-radius: 0 0 10px 10px;
padding:0 1% 0 1%;
padding:0 1% 0 1%;
height: 20%;
width: 98%;
background: #EAEFF9;
Expand All @@ -24,7 +24,7 @@
div.hasil {
overflow-x: scroll;
overflow-y: none;
transition: 0.3s ease-in;
transition: 0.05s linear;
font-size: 45px;
margin-top:5px;
}
Expand Down

0 comments on commit 6d9425b

Please sign in to comment.