I have a small problem, I want to get "path" from data attribute and add to background.
HTML
<div>
<div data-image="../images/header.jpg"></div>
</div>
jQuery
$('[data-image]').css(
{
background: "url("+$(this).data('image')+") no-repeat center",
backgroundSize: "cover",
height: ($(document).height()/ 3)
}
);
Do you have any idea how do this?