IE8 doesn't take effect while replacing a html tag

IE8 doesn't take effect while replacing a html tag

I have following jquery, which clicking a anchor link to load a content and replace the h1 to h2 tag in the loaded content before replacing a div content on current page

  1. $('.previous-news li a').click(function() {
    var url = $(this).attr('href');
    var link = this;
    $('.attachment-content').fadeOut("slow");
    $.get(url, function(data) {
       
      var $fullcontent = $('#main-content', data);
      var html = $fullcontent.html().replace(/h1/g,"h2");
      
      $(link).parents('.view-content').parents('.view-dom-id-2').find('.attachment .attachment-content').html(html);

    });
    $('.attachment-content').fadeIn("slow");
    return false;
    });













It works on firefox and webkit browsers but not in IE8 or 7. H1 tag is not replaced.