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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:16:19+00:00 2026-05-26T16:16:19+00:00

Please guide me how can I find a particular div using jQuery for following

  • 0

Please guide me how can I find a particular div using jQuery for following html –

       <div class="tab_container">
            <div id="tabs-1111" class="tab_content" style="display: block;">
                <p>26 High Street, Slough, SL1 1EP</p>
                <p></p>
            </div>
            <div id="tabs-1110" class="tab_content" style="display: none;">
                <p></p>
                <p></p>
                <div id="GoogleMap_Canvas" 
                    style="width: 410px; height: 450px; position: relative; overflow: hidden;">
                    <p></p>
                </div>
            </div>    
        </div>

I want to check if first div with ‘tab_content’ class contains div with id = ‘GoogleMap_Canvas’ or not – which should come out to be false for above html as it is in second div.

I tried using –

if ($(".tab_content:first").children('#GoogleMap_Canvas').length > 0)
or
if ($(".tab_content:nth-child(1)").children('#GoogleMap_Canvas').length> 0)

which seems to be working fine for me.

However, I am confused why following jQuery returns null?

($(".tab_content")[1]).children('#GoogleMap_Canvas') //returns null

Thank you!

  • 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-26T16:16:19+00:00Added an answer on May 26, 2026 at 4:16 pm

    Since you are checking for a unique id, this doesn’t need to be that complicated.

    if ($('#GoogleMap_Canvas').length > 0)
      //map div exists
    

    I believe you are getting a null because you are calling .children on a non-jquery object. Try this:

    $($(".tab_content")[1]).children('#GoogleMap_Canvas')
    

    or better:

    $(".tab_content:eq(1)").children('#GoogleMap_Canvas')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please guide me about how i can build an android app which can find
Can some one please guide me to understand which jar file i need to
Can you please guide me what is session and session variables? I don't need
Please guide what is meaning by Web is stateless in simple words ? Kindly
Please recommend some websites with a quick guide. MSDN is good but it's hard
Please consider this example class: [Serializable] public class SomeClass { private DateTime _SomeDateTime; public
I am trying to find a good example that can help me to understand
I have a html structure like this : <div id=nav_holder style=position:absolute;border-radius:400px;width:0px;height:0px;background-color:#460203;z-index:350px;> <div id=inner_wrap> </div>
I want to find articles when searched on following keyword: maruti sx4 maintenance costs
I am new to cocoa development Can any one please tell me how I

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.