Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7161961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:39:22+00:00 2026-05-28T13:39:22+00:00

I have an index.html file which looks like this (the rest is omitted), <ul

  • 0

I have an index.html file which looks like this (the rest is omitted),

<ul data-role="listview" data-theme="g">
    <li><a href="sync.html">Sync</a></li>
    <li><a href="list.html">List</a></li>
    <li><a href="">Add</a></li>
</ul>

So if I click on the list item called ‘List’ it takes me to list.html.

Inside list.html it includes this,

<script type="text/javascript" charset="utf-8">

    $(document).ready(function() 
    {
        createDatabase(readFromDatabase);
    });

</script>

$(document).ready does not fire in this circumstance when I am redirected to list.html.

If I refresh index.html it then fires. As you can guess I would like it to fire every time. What is happening?

I am using jquery, jquerymobile, and also phonegap.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:39:23+00:00Added an answer on May 28, 2026 at 1:39 pm

    This is because, with jQuery Mobile, you should use the pageinit event instead of $(document).ready(). It is explained in the event section of the jQuery Mobile Documentation (http://jquerymobile.com/demos/1.0/docs/api/events.html).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Absolute beginner question: I have a template file index.html that looks like this: ...
I have a view in a .js file apart the 'index.html' file which looks
I have a webpage, which url looks like this: http://www.mydomain.com/folder/index.php?title=The_title The only problem is
I have Javascript function defined in the main index.html file. One part of this
So I have a menu in a php file that looks like this (This
I have a directory which will look something like this: /test/ | |- index.php
I have an html file index.html (in my server say abc.com) which accesses xyz.js
I have an upload script that write a index.html file, I modified it to
I have a PHP script (index.php) that includes an index.html file in a sub-directory
I have a template in joomla without index.php I only have index.html, css file,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.