Answers for "change button color jquery"

-1

change button color jquery

// css
.ButtonClicked {
    background-color:red;
}

// html
<button id="ButtonId">PRESS ME</button>

// jquery
$("#ButtondID").click(
  function(){
  	$(this).addClass('ButtonClicked');
  }
);
Posted by: Guest on June-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language