Answers for "how to change icon class on click in 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 "how to change icon class on click in jquery"

Browse Popular Code Answers by Language