Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add background image to div using jquery

var imageUrl = "images/sky.jpg";
$(".div_with_class").css("background-image", "url(" + imageUrl + ")");
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #add #background #image #div #jquery
ADD COMMENT
Topic
Name
9+4 =