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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:39:07+00:00 2026-06-06T10:39:07+00:00

Fiddle: http://jsfiddle.net/MhWm5/16/ I have some dynamically generated table rows/values with dynamic IDs <td class=control-group>

  • 0

Fiddle: http://jsfiddle.net/MhWm5/16/

I have some dynamically generated table rows/values with dynamic IDs

<td class="control-group">
    <input name="price[418]" class="price" value="199.00">
    <span class="calcprice">I want this SPAN tag to update</span>
</td>
<td  class="control-group">
    <input name="price[424]" class="price" value="67.00">
    <span class="calcprice">I DO NOT WANT this SPAN tag to update</span>
</td>

I have a simple jQuery keyup function designed to update the SPAN here:

$('.price').keyup(function() {

   var AskPrice    = $(this).val();
   var calcSpan    = ".calcprice";
   var itemCost = AskPrice * (.8);
   console.log(itemCost);  // just for giggles

   $(this).parents().find(calcSpan).text(" You will receive $" + itemCost );

});    ​  ​

When the user types in the first input field, the span is updated in both table rows which is what I do not want. I can adjust the name of the class on each span, but I don’t think that helps.

Any helps is great.

  • 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-06T10:39:09+00:00Added an answer on June 6, 2026 at 10:39 am

    I would use the siblings() function to do this.

    See example: http://jsfiddle.net/MhWm5/26/

    Also note that I had to change your markup. You had td tags that were not nested in a table or tr and so it was not being rendered like you thought it would be. This actually may have been the root cause of your issue.

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

Sidebar

Related Questions

Here's me fiddle: http://jsfiddle.net/6yU6N/10/ I want to work some CSS magic on the table
Fiddle: http://jsfiddle.net/amitava82/dawkn/6/ The input elements will be generated dynamically based on json data received
Given this little fiddle: http://jsfiddle.net/5Sw3h/8/ I have a navigation panel to the left, a
Here is my fiddle: http://jsfiddle.net/jamesbrighton/wxWgG/4/ HTML: <div> <p class=click>Click 1</p> <p>This should be ignored</p>
I have this Fiddle: http://jsfiddle.net/GSA5R/2/ Whereby i use the border property to create the
See this fiddle: http://jsfiddle.net/uqJHf/ I have set the first column to show up with
This is best explained with a Fiddle: http://jsfiddle.net/hxsJx/ I want to add a class
Here's my current fiddle: http://jsfiddle.net/UjAQf/28/ I want to design the table in such a
Here's my current fiddle: http://jsfiddle.net/UjAQf/79/ My target table design is this: But I'm having
I have this fiddle: http://jsfiddle.net/y8Uju/5/ I am trying to save the numbers, because, when

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.