Question

I'm working on a mobile website based on two html files. One containing the swedish version and one containing the english version.

When you navigate from the swedish version to the englisg version the side-menu remains swedish(unless you refresh the page again), even though each file contains it's own side-manu (and the other way around).

Here is a link to an example

When you click on menu you will see the number "1", and when you go to page 2 (by clicking "LINK Page 2") and press menu, you will see number one. BUT if you refresh the page, will you see number 2 instead of 1. (try to navigate to page to page to, check the menu, then refresh the page and check it again.)

How can i fix this and why doesn't the side-menu change?

Was it helpful?

Solution

It's loading index.html and 1.html via AJAX into the page. The sidebar doesn't know that this is taking place, and so doesn't update. Seeing as how you're using jQuery-Mobile, I imagine they have some documentation about this - perhaps an event that you can listen for to manually update the sidebar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top