I am attempting to dynamically change the background image, but I am having trouble accessing the wrapper before "wrapper:before{}" from jQuery $('.wrapper:before)
.wrapper:before {
content: "";
position: fixed;
left: 0;
right: 0;
z-index: -1;
display: block;
background: url("https://image.tmdb.org/t/p/original/m1gYsC1uAu6EDc5pVIZ29DgwSrH.jpg");
background-size: cover;
width: inherit;
height: inherit;
-webkit-filter: blur(25px);
-moz-filter: blur(25px);
-o-filter: blur(25px);
-ms-filter: blur(25px);
filter: blur(25px);
}
.wrapper {
display: inherit !important;
height: 100% !important;
width: 100% !important;
padding: unset !important;
position: fixed;
left: 0;
right: 0;
z-index: 0;
color: #aaa;
overflow-x:scroll;
}
The jQuery code is as follows:
var image = "https://image.tmdb.org/t/p/w1280/" + data.backdrop_path;
$('.wrapper:before').css('background-image', 'url('+image+')');
Any suggestions on how to achieve this?