codingtcher.com
Theme Night
Home
Login

add background image to div using jquery

Home » Tutorial Post » add background image to div using jquery
//add background image to div using jquery
var imageUrl = "images/sky.jpg";
$(".div_with_class").css("background-image", "url(" + imageUrl + ")");

Related Post