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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:30:01+00:00 2026-06-11T05:30:01+00:00

i am trying to fix a bit of broken code here. basically its a

  • 0

i am trying to fix a bit of broken code here. basically its a little data table that shows the person a bit of summary data so that they can get a overview about what they are seeing it is a hidden by a tag that changes from show demographics to hide demographics. i am using javascript to toggle these elements using a link_to_function to accomplish it.

here is the code i have:

def drawer_links(drawer_name)
  s = []
  js = "$('#target_table','#show_target_link','#hide_target_link').toggle()"
  s << link_to_function('Show ' + drawer_name, js, :id => 'show_target_link')
  s << link_to_function('Hide ' + drawer_name, js, :id => 'hide_target_link', :style => 'display:none')
  return s
end

here is the basic idea that i had thats when the show_target_link is clicked then it will hide itself and then show the hide_target_link and the target_table. and when you click on the hide_target_link it will hide itself and the target_table and show the show_target_link. the issue i am finding is that when i click on the link nothing happens nothing changes. if i change the code to

  js = "$('#target_table').toggle()"

then when i click on the link it will toggle the target_table and obviously the links dont change. how can i then select multiple elements to take that same action. there are no console errors. and by me clicking on the link dosent even trigger the log. so there is no way for me to kinda sniff this out. anyone whith ideas?

  • 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-11T05:30:03+00:00Added an answer on June 11, 2026 at 5:30 am

    Try this,
    js = "$('#target_table,#show_target_link,#hide_target_link').toggle()"
    if it’s working
    or add a common class like toggleLink and and toggle link by toggleclass

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

Sidebar

Related Questions

I'm trying to maintain/update/rewrite/fix a bit of Python that looks a bit like this:
I'm a bit stuck here, basically I'm trying to compile Box2D as a static
I'm trying to fix single quote bug in the code: std::string Index; connection->Open(); String^
I'm going out of my mind a bit here. I'm trying to draw some
I have been trying to fix this for a bit, and I must be
I've been trying to fix this problem forever now and its bugging me. the
Hi I'm trying to fix a bit of test html to work with opera/chrome.
I am trying to make a page with css with the little bit of
new to perl, trying to playing around with its syntax a bit, then I
am in a bit of a fix here with a designer insisting a certain

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.