Answers for "javascript click on button change the 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 "javascript click on button change the icon"

Browse Popular Code Answers by Language