Answers for "check button to change icon jquery"

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 "check button to change icon jquery"

Browse Popular Code Answers by Language