I want to show a cursor not allowed option on a button. I want to do this with using CSS in javascript when my if-condition is met.
My button code is like this:
<button type="button" id="myBtn" class="btn btn-success" title=""></button>
this is my if condition:
if (percent <= 99)
{
//using class name:
document.getElementsByClassName("btn").style.cursor = "not-allowed";
}
else
{
//using id:
document.getElementsById("mybtn").style.cursor = "allowed";
}