Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery: If ul has no li Reply To: Jquery: If ul has no li

#245665
Mottie
Member

You’re right @nejuzofeco!

Personally I would use pure CSS instead: http://codepen.io/Mottie/pen/ZppzyB

ul:empty {
  padding: 0;
}
ul:empty::after {
   content: "Sorry this is empty";
   color: red;
}