Multipage template and toggle div
I have a multipage template with a settings menu div. Via this settings menu it is possible to navigate to pages within the template.
- //html
<div data-role="page" id="page1">
- <div id="settingsmenu">
- <a href="#page2" clickevent etc> page 2</a>
- </div>
- </div>
- <div data-role="page" id="page2">
- <div id="settingsmenu">
- <a href="#page1" clickevent etc> page 1</a>
- </div>
- </div>
- //javascript
- $('#settingsmenu').toggle();
The code above is simplified. When I navigate to a new page, the settingsmenu div is being hidden. When I navigate to the second page, the settings menu no longer appears. Jquery is still calling the settingsmenu div from the first page. Any suggestions on how I can address the settingsmenu div inside the page2 div?