I'm trying to remove the background-image attribute with jQuery but I had no success until now. The '::after' don't let me remove-it. How I can do that?
body::after {
background-image: url(../images/16_sm.jpg);
}
I'm trying to remove the background-image attribute with jQuery but I had no success until now. The '::after' don't let me remove-it. How I can do that?
body::after {
background-image: url(../images/16_sm.jpg);
}
Try like this,
Html:
<body class='test'>
Css:
.test::after{
background-image: url(../images/16_sm.jpg);
}
Js:
$('body').removeClass('test');
Try this.
$(body).css("background-image", "");
or
$(body).css("background-image", "none");