I currently have a <div id="slideshow">
element on my website.
This div is fully populated in the index.php file, but empty in all other pages (since it's a Joomla module).
When the div is full, everything works fine.
However, when it's empty, I need to change a CSS property of the next div (
<div id="slideshow">...</div><section>....</section>
).
I've tried using the following code:
alert($("div#slideshow").text() == "");
alert($("div#slideshow").is(':empty'));
The result on all pages shows: False , False. Why false for all? p.s. By "empty" I mean this:
<div id="slideshow"></div>
.
Thank you for your assistance.
I now realize where I went wrong. While inspecting with Chrome, the
<div id="slideshow"></div>
appeared to be truly empty, but copying it as HTML revealed:
<div id="slideshow">
</div>
So it's not actually empty! Now I'm left wondering, how should I proceed?