Reputation: 1702
I have a anchor tag
<a class="bx-prev" href="">Prev</a>
Now I want replace text "Prev" with
<i class="fa fa-arrow-right" aria-hidden="true"></i>
How to do it in jquery?
Upvotes: 0
Views: 1619
Reputation: 1115
use this script, it'll work surely;
<a class="bx-prev" href="">Prev</a>
$(document).ready(function(){
$('.bx-prev').click(function(){
$('.bx-prev').html('<i class="fa fa-arrow-right" aria-hidden="true"></i>');
return false;
});
});
Upvotes: 2