I have a jquery function addbluebody()
which add blue color to the body,
and a function hideCongratAndBlueBody()
which removes it.
My problem
is that i already had a fixed backgroundImage set for my body
, because of that the blue color is not showing on calling addbluebody()
how to override the backgroundImage of body and make visible bluecolor and again show backgroundImage when hideCongratAndBlueBody() ia called
.
function addBlueBody() {
$('body').addClass('bodyblue');
}
function hideCongratAndBlueBody() {
timeOut = setTimeout(() => {
$('body').removeClass('bodyblue');
}, 4000);
}
.bodyblue {
background: #3da1d1;
color: #fff;
}
body{
background-image:url(nature image.jpg);
}