I want to overwrite the outerHTML of a few links with the same class name. I just wanted to know if this is not working because jQuery doesn't support .outerHTML
. If it does, may you reference it? Also, is there a way to make this work:
$('.t').each(function() {
$('.t').outerHTML = '<a href="http://www.google.com">' +
'<img src="' + $('.t').attr('src') + '" class="' + $('.t').attr('class') + '" /></a>';
});