Published
- 1 min read
add background image to div using jquery
The solution for this is noted below
add background image to div using jquery
Solution
var imageUrl = "images/sky.jpg";
$(".div_with_class").css("background-image", "url(" + imageUrl + ")");
Try other methods by searching on the site. That is if this doesn’t work