change background image with jquery

86

change background image with jquery -

jQuery(document).ready(function($) {
    $('.bg-image').css("background-image", "url('myurl.jpg')");
});

change background colour jquery -

$(document).ready(function() {
  $("button").mouseover(function() {
    var p = $("p#44.test").css("background-color", "yellow");
    p.hide(1500).show(1500);
    p.queue(function() {
      p.css("background-color", "red");
    });
  });
});

jquery add style background-image -

$('myObject').css('background-image', 'url(' + imageUrl + ')');

Comments

Submit
0 Comments