jQuery Mobile

Demos

Menu Search

Using the same popup across multiple pages

You can reuse the same popup on multiple pages if you declare it as a direct child of the body element. It can then appear on any page in the document.

If you define the popup outside of any page, then you must take care to instantiate the popup widget yourself. You can do this as early as DOMReady, because the popup is not on any page.

The example below illustrates the setup with two pages.

Menu
Menu

Another Page

This is another page that can be reached using the links in the global menu.

Menu

Third Page

This is a third page that can be reached using the links in the global menu.