Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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>
 
PREVIOUS NEXT
Tagged: #change #icon #button #click
ADD COMMENT
Topic
Name
6+8 =