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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:15:04+00:00 2026-05-28T06:15:04+00:00

I have two views (for simplicity sake), one called Events, one called Friends. Their

  • 0

I have two views (for simplicity sake), one called Events, one called Friends. Their index pages list all of them. When you click one of the Friends in the friends index page, a jQuery function executes, allowing you to see their info.

My question is how (or if) I can use link_to in the Events page to link to the friends page, and then execute the correct jQuery function after to open that friend’s info.

So far it would be something like

= link_to "Edit Friend", 'friends'

I just need to know how or if I can execute a jQuery function after that page has been loaded.

  • 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-28T06:15:05+00:00Added an answer on May 28, 2026 at 6:15 am

    You could use the URL hash (#) like this:

    = link_to "Edit Friend", 'friends#friend-5'
    

    Where 5 is the id of the friend you want to show.
    Then with javascript pick up the hash using

    var hash = window.location.hash;
    

    to show the selected friend

    See here for an example: jsfiddle example,
    see here for the source: jsfiddle source

    Alternatively you can also route /friends/:id to "friends#index" and use the :id parameter to display the selected friend

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

Sidebar

Related Questions

I have two views one of them is in landscape and other in portrait.
i have two views 1st one is displaying list (uitableview used), user will select
I have two views, for simplicity sake a parent/child. The child is using trigger
I have two views, one view takes the whole screen, the second view covers
I have two views within one .xib (one view for landscape, another for portrait).
I have two views that I would like to combine into one. The first
I have two views: the first one is a UITableView in plain style (created
For simplicity lets say I have two flex mxml pages. form.mxml button.mxml If the
I have two views in SQL, and have created mappings to them in Linq
i have two views and one viewcontroller: one contains UIImageView with image, second have

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.