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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:22:19+00:00 2026-06-12T01:22:19+00:00

I have problem when i try to add column into row of table by

  • 0

I have problem when i try to add column into row of table by i know exactly what rows and column to added

I got index of rows and column therefore i know where my data will adding

Example i have a table with 4 rows and 3 columns

and i want add data into rows 2 cells 3

How can do it with Jquery or Javascript by using 2 loop

  • 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-12T01:22:20+00:00Added an answer on June 12, 2026 at 1:22 am

    Here is a sample http://jsfiddle.net/uwYxU/8/

    HTML:

    <table id="mytable" cellspacing="5" cellpadding="5" border="1">
      <tr>
        <td>a1</td>
        <td>a2</td>
        <td>a3</td>
      </tr>
      <tr>
        <td>b1</td>
        <td>b2</td>
        <td>b3</td>
      </tr>
      <tr>
        <td>c1</td>
        <td>c2</td>
        <td>c3</td>
      </tr>
      <tr>
        <td>d1</td>
        <td>d2</td>
        <td>d3</td>
      </tr>
    </table>
    

    jQuery:

    $('#mytable tr').eq(1).find('td:eq(2)').css({border:'1px solid red'}).text('my data');
    

    or

    $('#mytable tr:eq(1) td:eq(2)').css({border:'1px solid red'}).text('my data');
    

    in jQuery eq(0) returns first element, eq(1) second element and so on, it’s just like arrays, they start from 0.

    Edit: response to your comment
    you can check if a selector has found anything like this:

    var selector = $('#mytable tr:eq(1) td:eq(2)');
    if(selector.length>0) {
       // Apply styling or other rules
    } else {
       // create the missing element and append it
       var missingElement = $('<td>this was missing</td>');
       $('#mytable tr:eq(1)).append(missingElement);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having this problem try to use the cocos2d CCScrollLayer I have added
i have a problem when try to get and parse a remote JSON. require
I have a problem when try to use hashtable with large data. I have
I have a problem when I try to count how many times a word
I have a problem when I try to persist my model. An exception is
I have this problem when i try to synchronize a observable list with listbox/view
I have a problem when I try to set up Xcode . shown in
i have problem with maven. When i try to compile test classes ( mvn
I have problem with base classes in WPF. I try to make a base
I have problem with c# script who change user AD password, when try change

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.