I've this elements
<div class="circle-200" data-image="pic1" ></div>
<div class="circle-200" data-image="pic2" ></div>
<div class="circle-200" data-image="pic3" ></div>
after the page is loaded i would that the data-image values became the backgound-image of corresponding circle-200 class
Is it possible, using jQuery, do such a thing ?
$('.circle-200').css('background-image', "url('"+$(this).data('img')+"')");
data-*attributes and add them to the data for the elements. This means that you can access thedata-imageattribute via$(selector).data("image")(notimg)