I have this jquery code that changes the image of the background on click:
$('a.note').click(function(){
$('#full').css('background-image','img/1.jpg');
});
However, it's not changing. Is there something I'm missing?
I have this jquery code that changes the image of the background on click:
$('a.note').click(function(){
$('#full').css('background-image','img/1.jpg');
});
However, it's not changing. Is there something I'm missing?
You need to include the url() part of the background-image property.
$('#full').css('background-image','url(img/1.jpg)');
.css('background-image','');.css('background-image','none'); since that is the correct value for no background image. css3.com/css-background-image