jquery get css background image url
$('.block_4,.block_5').each(function(){ var img=$(this).find('.wrap').css('background-image'); img=img.replace('url(','').replace(')','').replace(/\"/gi,""); $(this).find('.wrap').css('background-image',''); console.log(img); $('<div class="photo"><img src="'+img+'" alt=""/></div>').insertAfter($(this).find('.title')); });