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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:46:09+00:00 2026-05-28T03:46:09+00:00

I ahve a jquery code that get the siblings of a table td text.

  • 0

I ahve a jquery code that get the siblings of a table td text.
How can we put that text into variables?

jQuery("tbody tr").each(function() {
    jQuery("td:not(:first)",this).click(function() {
        alert(jQuery(this).siblings().text());
    });
});

<table>
<thead><td>A</td><td>B</td></thead>
<tbody>
<tr><td class="aclass">A</td><td class="bclass">B</td></tr>
</tbody>
</table>

Set siblings as variable:

var txtA = jQuery(this).find(".aclass").text();
var txtA = jQuery(this).find(".aclass").text();
  • 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-28T03:46:10+00:00Added an answer on May 28, 2026 at 3:46 am

    You could add the texts in array:

    
    var textsArr = new Array();
    jQuery("tbody tr").each(function() {
        jQuery("td:not(:first)",this).click(function() {
            textsArr.push(jQuery(this).siblings().text());
        });
    });
    
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a xml code that can ahve two forms : Form 1 <?xml
I ahve a menu structure that uses UL and LI elements to drop down
Hey there, why does this code not work? $qry = mysql_query(SELECT performerid,pic0 FROM .$table.
I am cloning a table row using JQuery and, amongst other things, the row
I have some c# code running on sharepoint that i use to check inside
So i'm trying to make tabs with the JQuery UI framework, but I can't
I currently have the following code that retrieves data from the database and then
I ahve this code, the trouble is few of the images are having names,
Using fancy box I ahve built a photgallery. When the user clicks on a
i am making a project in which i ahve shedule somthing happen after a

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.