Issue with click event binding and hash URLs

Issue with click event binding and hash URLs

Hi all,

I'm having an issue with binding actions to links in a jQM app. Let me describe the scenario first.

The app works as a normal app, with AJAX navigation taking you to new pages, the way jQM is supposed to work. But when the page is a certain width, some specific pages go into a "split view mode" where two pages become one, a list on the left and the information on the right.

To achieve this I override the click even actions on the list when it's in this split view mode, so that they load the detail in the right side pane rather than go to the page. This all works fine when the page in question has the URL like www.mydomain.com/index.html
It breaks though when a user has navigated away from the page and back again, and now has the jQM built URL of www.mydomain.com/#/index.html - the overriding of the click events for the links simply doesn't work anymore (even though the actual binding of the links is being called) and jQM takes over and uses a transition to navigate to the page (rather than loading the details in the right pane).

I have tried adding rel="external" on the links in question, and data-ajax="false" on the links and on the link's container, to no avail.

Can anyone help? Is there something more fundamental that's wrong?

I'm using a simple link.bind('click', function(event) { ... }); to bind the links.

Thanks in advance.















    • Topic Participants

    • ian