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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:51:36+00:00 2026-05-26T07:51:36+00:00

Im trying to make a table with data attributes on the rows and the

  • 0

Im trying to make a table with data attributes on the rows and the ability to show divs with the same data attribute on click. I could add more data-attributes if it makes the jquery functions easier/smarter.

Need some help to make it all play nice 🙂

Thanks in advance!

EDIT: jsFiddle link: http://jsfiddle.net/MXpnQ/

$(".productRow").click(function () {
 $(this).parent().hide("slow"); //hides the fundListContainer
 --function to show the correct fundInfoContainer--?
});

$(".backToCorrectListButton").click(function () {
 --function to hide the fundInfoContainer and show the correct fundListContainer--?
});

<div class="fundListContainer">
<table>
 <tr class="productRow" data-fundId="1">
  <td></td>
  <td></td>
 </tr>
 <tr class="productRow" data-fundId="2">
  <td></td>
  <td></td>
 </tr>
</table>
</div>

<div class="fundInfoContainer" data-fundId="1" style="display: none">
 <div class="backToCorrectListButton">back to list</div>
</div>

<div class="fundInfoContainer" data-fundId="2" style="display: none">
 <div class="backToCorrectListButton">back to list</div>
</div>
  • 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-26T07:51:36+00:00Added an answer on May 26, 2026 at 7:51 am

    Sure you can!

    $(".productRow").click(function () {
       $(this).parent().hide("slow"); //hides the fundListContainer
       $("[data-fundId="+$(this).data('fundId')+"]").hide();
    });
    

    If you want to select a element by any of his attributes (data-attr or not) use the notation

    $("[attr_name=value]")

    See http://api.jquery.com/attribute-equals-selector/

    EDIT: Look if this is what you want

    http://jsfiddle.net/MXpnQ/3/

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

Sidebar

Related Questions

I'm trying to inherit QSqlTableModel to make data im my table display in way
I have data in data table like below. I am trying to make graph
I'm trying to make sure some data is auto-deleted when there's no more references
I am trying to make a summary table of many strings. My data looks
I am trying to make update statement in MySql table - just migrating data
I'm trying to make a truth-table generator for a digital electronics course because that's
I am currently trying to make a sectioned table like this: Section 1: Entry
I'm trying to make a dump of a MySQL table on the server and
Trying to make a make generic select control that I can dynamically add elements
Trying to make a generic PL/SQL procedure to export data in specific XML format,

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.