I have tried using these different methods in my code to solve the issue, but none of them seem to work. Please suggest an alternative approach for resolving this problem.
// Approach 1
if ("${actionBean.backgroundImage}" != null){
$(document.body).css("pointer-events", "none");
$(document.body).css("cursor", "default");
$(document.body).css("background", "url('${actionBean.backgroundImage}') no-repeat fixed center -80px / cover !important");
}
// Approach 2
if ("${actionBean.backgroundImage}" != null){
$('html, body').css("pointer-events", "none");
$('html, body').css("cursor", "default");
$('html, body').css("background", "url('${actionBean.backgroundImage}') no-repeat fixed center -80px / cover !important");
}
// Approach 3
if ("${actionBean.backgroundImage}" != null){
$("body").css("pointer-events","none");
$("body").css("cursor","default");
$("body").css("background", "url('${actionBean.backgroundImage}') no-repeat fixed center -80px / cover !important");
}
// Approach 4
if ("${actionBean.backgroundImage}" != null){
$(body).css("pointer-events", "none");
$(body).css("cursor", "default");
$(body).css("background", "url('${actionBean.backgroundImage}') no-repeat fixed center -80px / cover !important");
}