Posts by Ronald Rodrigo • 1 point
1 post
-
0
votes2
answers734
viewsA: Take the url of the first image of each post (div), store this url in a variable
$(window).load( $(function pegaId(id){ var imagemUrl = document.querySelector(".post-body img:nth-child(1)").src; console.log(imagemUrl); $("body").css("background-image", "url("+imagemUrl+")");…