Mobile

jquerymobile 외부 링크 넣기

saltdoll 2011. 2. 28. 03:46
반응형

Local, internal linked "pages"

A single HTML document can contain multiple 'pages' that are loaded together by stacking multiple divs with a data-role of "page". Each 'page' block needs a unique ID (id="foo") that will be used to link internally between 'pages' (href="#foo"). When a link is clicked, the framework will look for an internal 'page' with the ID and transition it into view.

It's important to note if you are linking from a mobile page that was loaded via Ajax to a page with multiple internal pages, you need to add a rel="external" or data-ajax="false" to the link. This tells the framework to do a full page reload to clear out the Ajax hash in the URL. This is critical because Ajax pages use the hash (#) to track the Ajax history, while multiple internal pages use the hash to indicate internal pages so there will be a conflicts.

For example, a link to a page containing multiple internal pages would look like this:


<a href="multipage.html" rel="external">Multi-page link</a>


출처: http://jquerymobile.com/demos/1.0a3/#docs/pages/docs-pages.html
반응형
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)