When I click on the icon I simply want to change its class and color. This is my code below
$(".sim-row-edit-icon").click(function(){
alert("Icon clicked");
// on click please change icon and color to red
});
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="sim-row-edit-icon">
<i class="fa fa-camera-retro"></i>
</div>
On click I want to change the li class to class="fa fa-address-book"
and color of icon to red.