codingtcher.com
Theme Night
Home
Login

Jquery change div background image

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

Related Code