jQuery(function($){ $('.blogcomment-gravatar').each(function() { var item = $(this); item.attr('src', item.attr('rel')); }); });