I am frankly surprised to see how difficult it is to find a left navigation example that works sequentially and as expected in JQM.
I ended up copying the code directly from JQM documents, including grabbing their custom .js and .css scripts (which defines the .content-primary
and .content-secondary
classes, as well as various @media
queries that make the menu responsive).
JQM documents do not use the multi-page format. Instead, each element of the navigation menu refers to a completely separate URL (presumably preloaded in the DOM, adding data-prefetch="true"
to the link), so each new page / URL should redefine the same navigation menu again.
This immediately makes my brain developers think "allow the abstract menu and turn it on every page automatically." But how to "include" the menu on each page without PHP (or another server)? This is a problem that I have not solved yet.
You can call the function $(document).bind('pageinit',
to manually enter your menu on the download page using javascript / jquery, but I still have to figure out how to do this correctly.
I will keep you posted if / when I have a workable solution.
source share