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 920451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:43:00+00:00 2026-05-15T18:43:00+00:00

I want to check the type of an element which is placed inside a

  • 0

I want to check the type of an element which is placed inside a div. I’m not able to reference the child element. I have tried using the following:

$("#"+styleTarget).siblings(0).get(0)tagName

Where styleTarget is a variable holding the id of the parent div.

  • 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-15T18:43:00+00:00Added an answer on May 15, 2026 at 6:43 pm

    There’s difference between a child and a sibling. In the example below, all the <li> are childrens of <ul>. Each <li> is a sibling of all of the other <li> elements, because they are on the same level in the DOM tree.

    <ul class="parent">
      <li>List 1</li>
      <li>List 2</li>
      <li>List 3</li>
    </ul>
    

    You should be using .children(), as documented here http://api.jquery.com/children/.

    $("."+styleTarget).children().get(0).tagName
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an upload script, and I want to check the file type
I have a user-defined table type. I want to check it's existence before editing
I have two objects of the same class (Model) type. I want to check
I want to check which port is used, when the port is not explicitly
Basically, during my MeasureOverride I want to check to see if my child element
i'm using ASP.NET ,i have a gridview with a checkbox element , i want
I want to check the type of an Object. How can I do that?
Usually, when I want to check the type of an object (whether it's an
I want to check that some integer type belongs to (an) enumeration member. For
using C# I have a class which contains among other meta information the root

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.