a bit hard to answer without knowing what method you are using to set
classes...js or html markup
one method may help, using the onBeforeShow option . "this" used in a
function in onBeforeShow refers to the UL about to be shown
you could try
$(this).parent("li").siblings("li;last").addClass("yourLastchildClass").
Likely several other ways depending on how you're markup is generated
and how you are currently setting classes
Goh Hao-Wei wrote:
Hello,
How do I get a <li> item to have both the Parent and the Last-Child
class at the same time? Reason is, I'm making use of Last-child class
to control the borders for the last item in a sub menu, but I'm having
difficulties when the last-child has its own sub menu, making it only
having the parent class without the last-child class.