How to find the DOM id of selected node after page transition.

How to find the DOM id of selected node after page transition.

I have a series of links which navigate to their own separate page. However, I then decided that before I get to each of those pages, I wanted the user to navigate through a common page, and then continue/redirect onto the individual pages after doing 'stuff' inside the common page (pre-configuring variables shared between all subsequent pages)

So initially I had this;

  1. <ul>
  2. <li>
  3. <a href="#option1" data-role="button">Option 1</a>
  4. </li>
  5. <li>
  6. <a href="#option2" data-role="button">Option 2</a>
  7. </li>
  8. <li>
  9. <a href="#option3" data-role="button">Option 3</a>
  10. </li>
  11. </ul>

Subsequently changed it to this (to support additional requirement); having common_page act as the gateway in front of each page

  1. <ul>
  2. <li>
  3. <a href="#common_page" id="option1_link" data-role="button">Option 1</a>
  4. </li>
  5. <li>
  6. <a href="#common_page" id="option2_link" data-role="button">Option 2</a>
  7. </li>
  8. <li>
  9. <a href="#common_page" id="option3_link" data-role="button">Option 3</a>
  10. </li>
  11. </ul>

I then wanted to use; (to redirect onto the eventual page)
  1. $.mobile.changePage (method)
triggered from within the common page handling code once the user had provided the required information.

The problem that I am having is getting hold of a reference to link that was selected from the list, which would tell me which page to forward to.

Any help or advice that people could provide would be great.

Thanks.