Skip to content

jquery.mobile: Disable location hash to enable functionality of bookmark links #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
itrickski opened this issue Aug 5, 2014 · 0 comments

Comments

@itrickski
Copy link
Owner

I have included jquery mobile in a large project, but didn't realize at the time that it does not support passing information via the hash. I'm committed at this point and am using other functionality of the platform. However, I need to be able to use the hash to implement bookmarks normally as 1) links to a place on the same page 2) links to a place on a different page.

After some research here at github (jquery-archive/jquery-mobile#5465) and in the jquery documentation (http://api.jquerymobile.com/global-config/) it seems like setting the following options on mobileinit should handle this

$.mobile.ajaxEnabled = false;
$.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false;
$.mobile.changePage.defaults.changeHash = false;

I want links to be treated as ordinary http events and would like to disable jquery's handling of hash, so that it will be handled normally by the browser.

I can't get this to work for either type of bookmarked link

  1. links to a place on the same page : link is not clickable at all. if i manually add rel="_external" or data-ajax ="false" to the tag, the same page link will work. but i'd rather handle this globally.
  2. links to a place on a different page: the link will jump to the destination page, but does not honor the bookmark location (always loads to top of page). i cannot get this to work at all.

I have added a sample project that demonstrates the issues I'm having in this repo: https://github.com/itrickski/jquerymobile_problems

Any help is greatly appreciated.

I hope that I'm posting this correctly. If not, please forgive me and provide direction...I'm new to github.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant