Minirock Minirock - 2 years ago 82
Javascript Question

Accessing a specific element from the DOM

Morning, I have some HTML like this:

<ul class="Menu1">
<ul class="Menu2">

I want to access all the
from a specific
(Menu 2 for example).
Sorry, I know this is really basic but what am I supposed to use instead of

Answer Source

IF the Menu and 2 are 2 separate class you can go with -

$('.Menu.2 li')

IF the Menu and 2 are 1 class that is Menu2 you can go with -

$('.Menu2 li')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download