Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Make Image Source the Background of an Element Re: Make Image Source the Background of an Element

#103281
TheDoc
Member

Here ya go!
http://jsfiddle.net/mrdw2/1/

$(document).ready(function() {
$('img').each(function() {
var imageURL = $(this).attr('src');
$(this).replaceWith('');
}):
});