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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:24:24+00:00 2026-06-14T08:24:24+00:00

I have a table of values. Is it possible with JQuery by clicking on

  • 0

I have a table of values. Is it possible with JQuery by clicking on currency link to change value in cells with exchange rates? This static example table

<table border="1">
    <tr>
      <td class="currency">100</td>
      <td class="currency">200</td>
      <td class="current">now in USD</td>
    </tr>
    <tr>
      <td class="currency">150</td>
      <td class="currency">230</td>
    </tr>
    <tr>
      <td class="currency">400</td>
      <td class="currency">200</td>
    </tr>
    <tr>
      <td class="currency">550</td>
      <td class="currency">2920</td>
    </tr>
  </table>

  <a href="#" class="USD">USD</a>
  <a href="#" class="EUR">EUR</a>

Pls look jsfiddle. In other words by clicking on currency values must recalculate them according to rates. In my example on jsfiddle I want to understand how simply change value(for example usd=1 eur=1.3) Thanks!

  • 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-14T08:24:25+00:00Added an answer on June 14, 2026 at 8:24 am

    First of all you need to store the original USD values so you can use those as a base for all exchange rates. A data-x attribute is perfect for this.

    $('.currency').each(function() {
        $(this).data('usd-value', $(this).text());
    });
    

    You can then simply multiply this value by whatever exchange rate you need, again stored in a data attribute on the link itself. Try this:

    <a href="#" class="exchange USD" data-exchangerate="1">USD</a>
    <a href="#" class="exchange EUR" data-exchangerate="1.3">EUR</a>
    <a href="#" class="exchange GBP" data-exchangerate="0.63">GBP</a>
    
    $(".exchange").click(function() {
        var rate = $(this).data('exchangerate');
        $('.currency').each(function() {
            $(this).text(parseFloat($(this).data('usd-value') * rate));
        });
    });
    

    Example fiddle

    Note I also added GBP just to show how extensible this method is.

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

Sidebar

Related Questions

Possible Duplicate: Concatenate row values T-SQL I have a table like this: ref_num name
I have a table ID|VALUE VALUE is an integer field with possible values between
Is it possible to edit computed-column values? I have a computed-col in my table,
I have to create a table with cells on which by clicking I have
I have 1 problem , I've taken one jquery plugin (filter on table). This
I have table cells with attributes data-position-x and data-position-y with integer values. I want
I have table which contains double values stored in mysql database ...I need to
I have created table and inserted values as below. create table mytable (id INT,
I have the following table and values: create table TreeTable ( ID int primary
I have a table with string values that need to matched individually to 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.