I am trying to detect if a certain css class has a background-image applied to it.
I can simply do the following to test if a background-image is present:
if ($('.vc_custom_1498122672544').css('background-image') != 'none') {
alert('There is a background image');
}
However the above class is generated dynamically, and will not always be known.
The div that has this class attached to it also has a few other classes applied. So i tried the following:
if ($('.vc_row-has-fill').css('background-image') != 'none') {
alert('There is a background image');
}
This doesnt return anything as the background-image is specifically targeting the class of .vc_custom_1498122672544
and not .vc_row-has-fill
.
Is there anything i can do to detect the background-image with the class .vc_row-has-fill
?