{"id":772,"date":"2013-01-08T15:52:54","date_gmt":"2013-01-08T15:52:54","guid":{"rendered":"https:\/\/ibex.tech\/javascript\/?p=772"},"modified":"2022-02-17T07:14:47","modified_gmt":"2022-02-17T07:14:47","slug":"page-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/javascript\/jquery-mobile\/pages\/page-general","title":{"rendered":".Page General"},"content":{"rendered":"<p>\nA typical page will be divided as: header, content, and footer.\n<\/p>\n<pre>\r\n<code>\r\n&lt;div data-role=&quot;page&quot;&gt;\r\n  &lt;div data-role=&quot;header&quot;&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div data-role=&quot;content&quot;&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div data-role=&quot;footer&quot;&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/code><\/pre>\n<p>\nThe header and footer are optional. &nbsp;All code inside a page must be within one of the 3 sections.\n<\/p>\n<h4>\nHiding The Browsers Address Bar<br \/>\n<\/h4>\n<p>\nOn compatible devices, such as Android-, webOS- and iOS- devices, jQuery Mobile will try to hide the browser&rsquo;s address bar by manipulating the initial scroll. This hack will only work if the content is tall enough to fit the available space.\n<\/p>\n<h4>\nOrientation&nbsp;Changes<br \/>\n<\/h4>\n<p>\njQuery Mobile will manage orientation changes between portrait or landscape itself on most devices adapting the UI automatically to the new viewport.\n<\/p>\n<h4>\nBrowser Title<br \/>\n<\/h4>\n<p>\nThe documents title is the browsers title which will be stored when bookmarking etc. &nbsp;I fyou want to change it when in different pages within a document use data-title:\n<\/p>\n<pre>\r\n<code>\r\n&lt;div data-role=&quot;page&quot; id=&quot;page2&quot; data-title=&quot;New Title To Use&quot;&gt;\r\n<\/code><\/pre>\n<h4>\nPage Title<br \/>\n<\/h4>\n<p>\nSet using the &lt;h1&gt; tag in the header (h1&nbsp;using the standard stylesheet). &nbsp;If it doesn&#39;t fit on a device it will be auto cropped.\n<\/p>\n<h4>\nFooter Title Text<br \/>\n<\/h4>\n<p>\nSet using the &lt;h4&gt; tag in the footer (h4 using the standard stylesheet). &nbsp;If it doesn&#39;t fit on a device it will be auto cropped.\n<\/p>\n<h4>\nMultiple Pages Within 1 Document<br \/>\n<\/h4>\n<p>\nIf there is not dynamic content you can have lots of pages in 1 document and its a balance between the user getting all of the pages in a single download of a file and the file being so big that its slow to download.\n<\/p>\n<h4>\nAccessing the current page<br \/>\n<\/h4>\n<p>\nUse the $.mobile.activePage attribute that is automatically linked to the current visible data-role=&quot;page&quot; element.&nbsp;\n<\/p>\n<pre>\r\n<code>\r\n\tvar currentPageId = $.mobile.activePage.id;\r\n<\/code><\/pre>\n<p>\nYou can access the current page container (usually the body element) with the $.mobile.pageContainer attribute.&nbsp;\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A typical page will be divided as: header, content, and footer. &lt;div data-role=&quot;page&quot;&gt; &lt;div data-role=&quot;header&quot;&gt; &lt;\/div&gt; &lt;div data-role=&quot;content&quot;&gt; &lt;\/div&gt; &lt;div data-role=&quot;footer&quot;&gt; &lt;\/div&gt; &lt;\/div&gt; The header and footer are optional. &nbsp;All code inside a page must be within one of the 3 sections. Hiding The Browsers Address Bar On compatible devices, such as Android-, webOS- and [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86],"tags":[],"class_list":["post-772","post","type-post","status-publish","format-standard","hentry","category-pages"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/comments?post=772"}],"version-history":[{"count":13,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/772\/revisions"}],"predecessor-version":[{"id":1385,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/772\/revisions\/1385"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/media?parent=772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/categories?post=772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/tags?post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}