I am trying to display only the first 5 li elements in the #news div.
If there is no li (try to erase them and run the script again) the #nonews div should appear and the #news div should disappear.
If it’s less than 5 items it sould calculate the height (newsli x30px)
Where did I go wrong?
You didn’t close news correctly!
You’re missing the
/As such,
#nonewsis a child of#news, and when you make#newsdissapear they both go.Darn little mistakes.
Here’s the working fiddle. All I did was close news properly