Answers for "change icon after click"

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 icon after click"

Browse Popular Code Answers by Language