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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:23:09+00:00 2026-06-12T07:23:09+00:00

Since jQuery Mobile’s method changePage will load only the element with the data-role=page attribute

  • 0

Since jQuery Mobile’s method changePage will load only the element with the data-role=”page” attribute set, I am not able to use external .js files in my project.

A couple workarounds I’ve come across:

  • Load all the .js at once in the first page. It works perfectly, I can use events when each page loads and have it structured on different .js files. It doesn’t look right to me though.
  • Use tags within the data-role=”page” div. It works too, but I don’t know how “elegant” is to insert in random places in the HTML.
  • Use jQuery to load it asynchronously. I would make a request as the new page loads. Drawback: not so elegant either and generates two requests.

I couldn’t find any information on this matter in the documentation. What solution is considered the best one?

  • 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-12T07:23:10+00:00Added an answer on June 12, 2026 at 7:23 am

    The generally accepted approach seems to be to use a build script (such as a Node.js jakefile https://github.com/mde/jake) to build a ‘production’ copy of your web app where the scripts it requires are all aggregated into one and minified.

    Dynamic loading of JS files is possible with hacks but I don’t believe its generally worthwhile.

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

Sidebar

Related Questions

I have a malfunctioning set of jquery datepickers that are only not working since
jQuery Mobile seems to calculate the page height upon initializing, but since we enable
For jQuery Mobile I need markup like: <form action=... method=get data-ajax=false> <!-- Fields -->
I am using PJAX https://github.com/defunkt/jquery-pjax and I was wondering since the whole page does
jQuery Mobile vmousemove event only gets fired when I press the tablet, and when
By default jQuery Mobile transitions is set to fade. I know i can add
I'm working on mobile web page using jquery mobile, it seems to have almost
i would like to load 3 images in a canvas. I'm using jquery mobile
Is there a best practice for adding validation to jQuery Mobile forms? Since the
Just wondering. I have a page in Jquery Mobile which uses a popup that

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.