change background image with jquery
jQuery(document).ready(function($) { $('.bg-image').css("background-image", "url('myurl.jpg')"); });
Source: www.tutorialspoint.com
jquery set style background image
$('myObject').css('background-image', 'url(' + imageUrl + ')');
Source: stackoverflow.com
jquery add style background-image
$('myObject').css('background-image', 'url(' + imageUrl + ')');
Source: stackoverflow.com
get background image URL jQuery
jQuery('selector').css('background-image'); // gets the image URL jQuery('selector').css('background-image', 'path/to/image.jpg'); // sets the image URL