Book Image

jQuery Mobile First Look

Book Image

jQuery Mobile First Look

Overview of this book

Table of Contents (17 chapters)
jQuery Mobile First Look
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

How to link internal and external pages


First of all, we must understand how we can differentiate between internal and external pages.

Internal pages are those pages whose domain is the same as the currently displayed pages.

Obviously, external pages are pages whose domain is anything but the one we're currently browsing or that have rel="external" or target attributes.

For example, let's say we are visiting the page http://example.com/mobile.html and we have the following elements:

Link markup

Link type

<a href="http://example.com/home.html">

Internal

<a href="http://example.com/home.html#about">

Internal

<a href="http://example.com/home.html" rel="external">

External

<a href="http://example.com/home.html" target="_blank">

External

<a href="http://google.com">

External

The reason that jQuery Mobile makes this kind of separation lies in the way the framework handles the two types of link.

Whenever the library has to deal with internal links, they are...