Convert Text to Links using jQuery

Yesterday for one of my requirement, I needed to convert bold text of the a div element to hyperlink using jQuery. To do this, jQuery provides wrap() method which is used to wrap HTML element around each of the matched elements.

Below jQuery code, uses jQuery wrap() method to wrap the bold text to hyperlink.
$(document).ready(function() {
  $("#btnConvert").click(function() {
    $('div b').wrap('<a href=""/>');
See result below

See Complete Code
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..