ExampleGet the name and value of the first p element:
Try it yourself » |
The get() method gets the DOM elements specified by the selector.
$(selector).get(index) |
Parameter | Description |
---|---|
index | Optional. Specifies which of the matching elements to get (by index number) |