jQuery: excluding root element of a list tree (ul)
问题 I've been using a piece of jquery code from stack overflow. Here's the link to the page: https://stackoverflow.com/questions/2...76196#13976196 I need to hide a large UL tree structure except the root elements. The code above works great except I can't understand the following line: Code: $('ul, li', $('#lesson-sidebar ul li')).hide(); That code hides all of the UL and LI items in the lists, but excludes the root elements. I don't understand how adding $('#lesson-sidebar ul li') as a selecond