Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6225867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:55:24+00:00 2026-05-24T08:55:24+00:00

I’m lead to this question when trying to figure out the difference between jQuery’s

  • 0

I’m lead to this question when trying to figure out the difference between jQuery’s .get() and .index(), I’ve looked over the jQuery API and I still don’t get what the difference is between them, maybe i’m not understanding the terminology?

What’s the difference between a jQuery object and a DOM element? And are a DOM element and a DOM node the same thing? Are they just <div> and <a> etc. is a DOM node/DOM element just an HTML tag?

EDIT: and isn’t the DOM just the structure of the page? <html><body>etc.</body></html>?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:55:24+00:00Added an answer on May 24, 2026 at 8:55 am

    The get method is used to access the DOM elements within a jQuery object:

    var allDivs = $("div").get();
    

    In that example, allDivs will be an array containing all the matched elements (in this case, it would contain every div element in the DOM).

    The index method returns an integer that tells you the position of the selected element relative to its siblings. Consider the following HTML:

    <ul>
        <li>1</li>
        <li id="second">2</li>
        <li>3</li>
    </ul>
    

    And the following jQuery:

    console.log($("#second").index()) //Prints "1"
    

    As for your other question, a DOM node is pretty much anything in the DOM. Elements are types of nodes (type 1). You also have, for example, text nodes (type 3). An element is pretty much any tag.

    To make that clearer, consider the following HTML:

    <div id="example">
        Some text
        <div>Another div</div>
        <!--A comment-->
    </div>
    

    And the following JS:

    var div = $("#example").get(0);
    for(var i = 0; i < div.childNodes.length; i++) {
       console.log(div.childNodes[i].nodeType);   
    }
    

    That will print out:

    3 - Text node ("Some text")
    1 - Element node (div)
    3 - Text node ("Another div")
    8 - Comment node (<!-- -->)
    3 - Text node ("A comment")
    

    You can find a list of node types here. For an excellent introduction to what the DOM actually is, see this MDN article

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.