Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
134
rated 0 times [  137] [ 3]  / answers: 1 / hits: 33231  / 13 Years ago, sat, february 25, 2012, 12:00:00

Jquery Mobile has decided to treat anchor links as page requests of sort. However, this isn't good if you have a load of blog posts which have anchor links to the same page (ie href=#specs).



Is there a way to disable jquery mobile's anchor link usage on a specific page which I know I won't be using it on so I can use anchor links as they were intended, to drop down to a part of the page?



I only need a solution for anchor links on the same page (ie: href=#specs).



thanks


More From » jquery

 Answers
47

You could try adding a data-ajax=false on the anchor tag.




Linking without Ajax



Links that point to other domains or that have rel=external,
data-ajax=false or target attributes will not be loaded with Ajax.
Instead, these links will cause a full page refresh with no animated
transition. Both attributes (rel=external and data-ajax=false)
have the same effect, but a different semantic meaning: rel=external
should be used when linking to another site or domain, while
data-ajax=false is useful for simply opting a page within your
domain from being loaded via Ajax. Because of security restrictions,
the framework always opts links to external domains out of the Ajax
behavior.




Reference - http://jquerymobile.com/demos/1.0.1/docs/pages/page-links.html


[#87210] Friday, February 24, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emilianoc

Total Points: 568
Total Questions: 109
Total Answers: 99

Location: Oman
Member since Sat, Jan 7, 2023
1 Year ago
;