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;
- <ul>
- <li>
- <a href="#option1" data-role="button">Option 1</a>
- </li>
- <li>
- <a href="#option2" data-role="button">Option 2</a>
- </li>
- <li>
- <a href="#option3" data-role="button">Option 3</a>
- </li>
- </ul>
Subsequently changed it to this (to support additional requirement); having common_page act as the gateway in front of each page
- <ul>
- <li>
- <a href="#common_page" id="option1_link" data-role="button">Option 1</a>
- </li>
- <li>
- <a href="#common_page" id="option2_link" data-role="button">Option 2</a>
- </li>
- <li>
- <a href="#common_page" id="option3_link" data-role="button">Option 3</a>
- </li>
- </ul>
I then wanted to use; (to redirect onto the eventual page)
$.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.