Currently working on a project with a website here:
Looking for a solution to determine the visibility of the element #cookie-law-info-bar.
Unfortunately, the usual is('visible') method is not functioning as expected in Chrome. Therefore, I am attempting to directly inspect the inline styling to check for display: none or display: block.
To address this issue, I have incorporated the following script:
jQuery( document ).ready(function($) {
var style = $("#cookie-law-info-bar")[0].style
console.log(style)
var display = $("#cookie-law-info-bar")[0].style.display
console.log(display)
});
Upon running the script, the console output is as shown here: https://i.sstatic.net/QN8Ui.png
Regardless of my attempts, whether accessing $elem.style.cssText or $elem.style.backgroundColor, the outcome consistently returns as an empty string.
Feeling a bit disheartened, any assistance or insight would be greatly appreciated.