Response title
This is preview!
<html class="ui-mobile"><head><base href="http://demos.jquerymobile.com/1.4.5/swipe-page/seoul.html">... and is 89 lines, but it also has an html element that starts with:
<div style="min-height: 887px;" tabindex="0" data-external-page="true" data-url="/1.4.5/swipe-page/seoul.html" data-role="page" id="seoul" class="demo-page ui-page ui-page-theme-b ui-page-active" data-title="Seoul" data-dom-cache="true" data-theme="b" data-prev="capetown" data-next="sydney"> <div role="main" class="ui-content"> <div id="trivia-seoul-placeholder" style="display: none;"><!-- placeholder for trivia-seoul --></div>... and is just 12 lines.
If you don't get that right, you are going to find that almost ANY plugin that you use for ANY purpose won't work right!One of the keys to making it work is to have the identical <head>, save the <title>. It sounds like you had different <head>s with different CSS and maybe scripts.
line?$( ":mobile-pagecontainer" ).pagecontainer( "load", next + ".html" );
I did that, and it works, but when you go back to the index.html page, the script is still running, and it's placing the background image I used on the other page there. How do I kill the script before returning?If you have some script that you use only on one page, you can include it in <body> , just before the end of <div data-role="page"> .
I've tried to find documentation on this, but everything I've found is very brief and hard to understand.If you know about jQuery Mobile ajax page navigation, you will know to ignore documentation in plugins that tells you to use $(document).ready() and initialize the plugin in a pagecreate callback and you will also know the valid places to link to the script.
© 2013 jQuery Foundation
Sponsored by and others.