Answers for "change button icon"

2

change icon on button click

<button type="button" id="eye" class="btn btn-default" onclick="show()"> <i class="fa fa-eye"></i> </button>
<script>
  function show() {
        $('#eye').find("i").toggleClass("fa-eye fa-eye-slash");
  }
</script>
Posted by: Guest on June-08-2021

Code answers related to "change button icon"

Browse Popular Code Answers by Language