The inconvenience that I have to start must de-enable the buttons above and below, and does not perform any function, until you click on the start button and enable the buttons and perform the functions you already have , the problem is that I do not have to change the tags (a) for some tags (button) and since I already gave a click functions to each button it does not let me perform since looking for I saw that to deactivate them it is with .bind()
but also performs the function that had already given in the code.
You do not have to change the label to (button).
HTML
<a class='btn-up'><span class='triangle-up'></span></a>
<a class='btn-down'><span class='triangle-down'></span></a>
JQUERY
$(".btn-up").bind("click",false);
$(".btn-down").bind("click",false);
$("#btniniciar").on("click", function(){
$("#btniniciar").hide();
$("#btnreiniciar").show();
$("#masaInputID").prop("disabled",false);
$("#masaInputID").css("color","white");
casos(masa);
updateM(masa);
});
/*BOTON ABAJO*/
var decreaseMasa = document.getElementsByClassName('btn-down')[0];
decreaseMasa.onclick = function() {
masa = Math.round(masaInput.value);
masa = masa - 100;
if(masa <= 100){
masa = 100;
}
casos(masa);
updateM(masa);
};
/*BOTON ARRIBA*/
var increaseMasa = document.getElementsByClassName('btn-up')[0];
increaseMasa.onclick = function() {
masa = Math.round(masaInput.value);
masa = masa + 100;
if(masa >= 500){
masa = 500;
}
casos(masa);
updateM(masa);
};