I have multiple icons, I want to change my certain icon to another icon based on the ajax result. For example, when the res = true, my bookmark icon needs to change to fa fa-address-card icon. Now the code is when the res = true, both icon will change. Does anyone know how to solve it? Thanks in advance.
<i id="bookmark" class="fa fa-bookmark"></i>
<i id="database" class="fa fa-database"></i>
$('i').removeClass('fa-bookmark');
$('i').addClass('fa fa-address-card');