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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:21:55+00:00 2026-06-16T00:21:55+00:00

It seems JQuery has some magic/nuances for using .find method for input element or

  • 0

It seems JQuery has some magic/nuances for using .find method for input element or some sophisticated descendants (or I am blind).
This is my JS code:

<div id="edit_lists_div">
  <div style="width: 100%; margin-bottom:5px">&nbsp;
  <button value="" style="display: none;" id="edit_lists_div_btn1">Btn1</button>
  <button value="" style="display: none;" id="edit_lists_div_btn2"
  disabled="disabled">Btn2</button>
  <button value="" style="display: none;" id="edit_lists_div_btn3"
  disabled="disabled">Btn3</button>
  </div>
  <div style="width: 100%; height: 210px; overflow: auto;">
  <table class="my_grid" id="edit_lists_div_table">
      <thead>
      <tr>
          <th width="30"></th>
          <th style="display: none;">id</th>
          <th width="100">Title</th>
          <th width="25">Some field 1</th>
          <th style="display: none;">some_property</th>
          <th>Some field 2</th>
      </tr>
      </thead>
      <caption>Lists</caption>
      <tbody>
      <tr>
          <td property_name="">
          <input row_selector="true" type="checkbox">
          </td>
          <td style="display: none;" property_value="157" property_name="id">157</td>
          <td property_value="List1" property_name="title">List1</td>
          <td property_value="4" property_name="subscribers_count">4</td>
          <td style="display: none;" property_value="9867,9869,9871,9868"
          property_name="subscribers">9867,9869,9871,9868</td>
          <td property_value="New" property_name="status">New</td>
      </tr>
      </tbody>
  </table>
  </div>

All I want to get the input field

<input row_selector="true" type="checkbox">

and manage it somehow. But .find can not find it! Here is what I do:

var tmp = $("#edit_lists_div").find("tbody");
var div_inputs = tmp.find("input"); // it is empty!

What is the problem here?

UPDATE 1: Note, the solution is still not found here. I’ve choosed already correct answer but unselected it because it became not workable in my app context. I mean this answer:

var tmp = $("#edit_lists_div").find("tbody");    
var div_inputs = $('input[type="checkbox"]', '#edit_lists_div');

was workable just for the FIRST Firebug debugging. Than I had empty/not_found JQuery object again.

The same story is for this code:

var tmp = $("#edit_lists_div").find("tbody");    
var div_inputs = $('input', '#edit_lists_div');

for the first single time it worked. But was broken after second try. What a mysticism here?!

UPDATE 2: As for possible problem at my handler… it’s not! I’ve checked this code for this case:

$.ajax({
url : getUrl(),
dataType : "json",
success : function(data) {
   // my code goes here and still can't get input element!
  }
});

UPDATE 3: If it matter what for I need these inputs:

div_inputs.each(function() {
// some business logic with found inputs goes here
});
  • 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-06-16T00:21:55+00:00Added an answer on June 16, 2026 at 12:21 am

    OK, the solution is found. It was not in JQuery. It was in my app architecture. I had async $.ajax invocation before my JS code. On success function it created my table but as you understand I’ve tried to access this table elements before success method processing so before they were created!

    Hope it will help some one. Beware of AJAX!

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

Sidebar

Related Questions

I am using jQuery's $.ajax method to retrieve some JSON from an API. Each
I have a simple javascript (JQuery based) method that does some css magic to
Seems Angle Brackets Are Not Allowed in the createElement Method has some impact on
It seems that i cannot access $(this) inside jquery ajax success function. please see
In jquery when I run: $('li').each(some-function(i){}); The IDE seems to know that some-function is
It seems that each Ajax History and Bookmark plugin has some minor bugs, ranging
Is there some jquery magic that will let me do the following: [0- define
How can I turn this array of objects (which has some duplicate objects): items
I'm using jQuery Mobile with some dynamic content added with KnockoutJS after making an
I am using jQuery 1.8.3 and jQuery UI 1.9.2. My web application has got

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.