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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:34:59+00:00 2026-05-23T09:34:59+00:00

A table isn’t a sibling to a hyperlink is it? I have: <a href=JavaScript:;>Show

  • 0

A table isn’t a sibling to a hyperlink is it?
I have:

<a href="JavaScript:;">Show me the table</a>
<table class="hidden">
...
</table>

Q: What jQuery selector do I use to get the table following the anchor tag?

$('a').click(function() {
   $(this).something.slideDown();
});
  • 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-23T09:35:00+00:00Added an answer on May 23, 2026 at 9:35 am

    I strongly suggest not assuming your table will always be adjacent. It may be right now, but if you need to move it for some reason your code will break.

    Save yourself some trouble and store an identifier for the table in the anchor element. One option is to use data attributes to store the selector.

    <a href="#" data-target-table="#table1">Show me the table</a>
    <table id="table1" class="hidden">
        ...
    </table>
    

    and get it using .data()

    $('a').click(function() {
        var $this = $(this);
        var $table = $($this.data('targetTable'));
        $table.something.slideDown();
    });
    

    An alternative is to have a common class on each element and use that to select the table.

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

Sidebar

Related Questions

I have a table that isn't going to get very big and contains the
I have a table cell that isn't entirely filled with text so the bg
I have a SQL query that isn't table-specific and I don't know how to
i have a sql server table with records (that isn't new) it has 1
Table: UserId, Value, Date. I want to get the UserId, Value for the max(Date)
table data of 2 columns category and subcategory i want to get a collection
Suppose I have a table that contains valid data. I would like to modify
I've got a problem with fluent nhibernate table per class hierarchy mapping. I've got
I have two models and a join table, User , Post and posts_users .
How come the Macromedia Flash Player isn't present in the WMI win32_product table? The

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.