Usually, when I have JS problems, it's a simple syntax error, but I'm stumped on this one.
Why in the world would this:
be returning null?Code:var iconHeight = $('ul.icon-nav > li:first-child').outerHeight(true);
It definitely has a height, and even if it didn't, shouldn't it return 0?
The API says outerHeight() returns "null if called on an empty set of elements". This has me thinking that maybe the selector isn't matching. But I don't understand why it wouldn't. For S's and G's, here's the HTML:
I've also tried a number of different possibilities for the selector, including:HTML Code:<ul class="icon-nav"> <li> <a href="./#services"> <img src="/images/services.png" alt="Roe Designs Services" class="icon"> <div class="caption">Services</div> </a> </li> <li> <a href="./#portfolio"> <img src="/images/contact.png" alt="Roe Designs Porfolio" class="icon"> <div class="caption">Work</div> </a> </li> <!-- Repeat --> </ul>
ul.icon-nav li
ul.icon-nav > li
ul.icon-nav li:first
.icon-nav every combination of li above
What, for the love of God am I missing?