Ubah gambar latar belakang dengan jQuery
jQuery(document).ready(function($) {
$('.bg-image').css("background-image", "url('myurl.jpg')");
});
Anthony Smith
jQuery(document).ready(function($) {
$('.bg-image').css("background-image", "url('myurl.jpg')");
});
$('myObject').css('background-image', 'url(' + imageUrl + ')');
$('myObject').css('background-image', 'url(' + imageUrl + ')');
jQuery('selector').css('background-image'); // gets the image URL
jQuery('selector').css('background-image', 'path/to/image.jpg'); // sets the image URL