My goal is to change the class and color of an icon when it is clicked. Here is the code I am using:
$(".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>
When the icon is clicked, I want to change the li class to class="fa fa-address-book"
and make the color of the icon red.