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 8578795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:28:28+00:00 2026-06-11T20:28:28+00:00

I have a mobile site, where the pages all include a script js file,

  • 0

I have a mobile site, where the pages all include a script js file, all the pages are separate but preloaded into the dom cache.I have a mobile site, where the pages all include a script js file, all the pages are separate but preloaded into the dom cache.

When i can the hen i can the:

$(document).live('pageinit',function() { console.log('test') }

I get about 15 messages due to there being about 15 pages preloaded from the start page.
is there an appropriate alternative event that will only fire when the page is actually brought into the active state?

or another solution to this issue?

EDIT: Additional Info:

I am using a php framework to serve the pages and each page is templated to include the same script.js file, this script file simplhy controlls thing a the navigation accordion and dynamic page changes, however it fires onece for each of the preloaded pages.

  • 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-06-11T20:28:29+00:00Added an answer on June 11, 2026 at 8:28 pm

    It depends on how you would like to structure your pages. I don’t know what’s the intention behind having 15 different pages with their own logic. I see 2 different ways

    1. Have a “master” page which has the pageinit event and handles all of its “child” pages which are just containers for the displayed (jquery mobile) HTML
    2. Use a separate pageinit on each page which does just the initialization of its own context, i.e. the page it is inside. This might become tricky as I’m not sure you’re able to always clearly identify the context your pageinit is currently running in.

    I’m not sure that on whether I was able to help you. You’d have to explain more in detail on what’s the intention behind having 15 different pageinits on each page.

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

Sidebar

Related Questions

Has anyone ran into this issue? We have a mobile site that can't use
I'm building my first jquery mobile site and have run into a problem. When
I have a site that can allow me to access the mobile version of
We all know that we're supposed to combine our CSS into one file, but
I have a mobile site and I'd like to redirect users to the domain.mobi
I have a mobile site running with jQuery Mobile. I want to have standard
Possible Duplicate: Mobile site - force landscape only / no auto-rotate I have seen
I have a public desktop site, a public mobile site, and a private intranet
I have linked a form from campaign monitor to a mobile site and I
I'm developing a mobile version of my site and I don't have my mobile

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.