dio-v
12/4/2013 - 6:11 AM

Replace a tag with another in jQuery Replace the anchor tag inside div class=”normal replace” with normal div tag while keeping it’s content

Replace a tag with another in jQuery Replace the anchor tag inside div class=”normal replace” with normal div tag while keeping it’s content.

$('.normal > a').replaceWith(function() {
    return $('<div/>', {
        html: this.innerHTML
    });
});