0

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?

Nida
  • 1,672
  • 3
  • 35
  • 68
  • This is poor research. jQuery docs is the place for you. – Muli Yulzary Jun 15 '16 at 11:35
  • 2
    Possible duplicate of ["jQuery way" to replace just a text node with a mix of HTML and text?](http://stackoverflow.com/questions/12851702/jquery-way-to-replace-just-a-text-node-with-a-mix-of-html-and-text) – James Fenwick Jun 15 '16 at 12:24

1 Answers1

2

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;
});

});
Sonu Bamniya
  • 1,095
  • 1
  • 13
  • 29