How would I go about getting a “div” based on its’ position in HTML.
For example, in default Javascript, you do:
document.getElementsByTagName("div")[5]
However, I can’t find a way to do it in jQuery. I’d imagine it to be something like:
$("div")[5]
If it isn’t possible, please tell me a way around it because I am clueless at this point.
Thanks so much, it’s the last thing I need in this website I am working on.
document.getElementsByTagName("div")[5]is equivalent to$('div')[5]If you want the jQuery object instead of the node…
Nth child starts on 1 versus indexes start at 0