@Yong: you’ll need to load a jQuery library and then call the code after the page has loaded. I could give you a step-by-step manual but I recommend you check out a tutorial at http://www.jquery.com, so you’d know what you’re doing.
@Paulie_D: see what you mean, but I’ve had situations where I really needed to select a parent element if the child element had some class or other condition. Can’t remember what it was exactly, but just saying that it does happen sometimes! ;)
I agree with @Paulie_D. If you can share a bit more information, I’m sure we can find a way to do what you want using the anchor instead of the list-item. Otherwise, I would suggest using a pure JS solution. Calling the entire jQuery library just for this is overkill.