Mobi Mobi - 2 years ago 97
Javascript Question

How to select second div using jQuery in a webpage?

If a webpage has 2 div tags like


How could I select second div, is it possible using jQuery?

Answer Source

The following will get the second div using the eq method:



Please note that @Cerbrus's answer is also correct, you can do this without jQuery.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download