Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

jQuery Misc get() Method

❮ jQuery Misc Methods


Get the name and value of the first <p> element:

  var x = $("p").get(0);
  $("div").text(x.nodeName + ": " + x.innerHTML);
Try it Yourself »

Definition and Usage

The get() method gets the DOM elements specified by the selector.



Parameter Description
index Optional. Specifies which of the matching elements to get (by index number)

❮ jQuery Misc Methods