function call returns an array, so you cannot use the style property, because it's only available for DOM nodes. In cases like this you would need to iterate through all the items in the array and set styles for the elements individually.
For simpicity, I would recommend using this jQuery snippet, which makes this much easier:
Simple question.
How do I hide the large empty rectangle when the user has javascript turned off?
I tried using
.ls-wp-container{display:none;}
which hides the div
and then this:
document.getElementsByClassName("ls-wp-container").style.display = "block !important";
But it doesn't display when it should.
Help please.
Thanks.
Hey PartuOnline,
There is an error in your code. The
function call returns an array, so you cannot use the style property, because it's only available for DOM nodes. In cases like this you would need to iterate through all the items in the array and set styles for the elements individually.
For simpicity, I would recommend using this jQuery snippet, which makes this much easier:
Thanks! That works perfectly.
Thank you for the feedback, glad you could solve the problem. If you need further assistance please let us know.