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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:35:34+00:00 2026-05-30T19:35:34+00:00

My jquery mobile layout has a navigation bar that contains both buttons. When click

  • 0

My jquery mobile layout has a navigation bar that contains both buttons. When click on a button, another file (html5+jquery-mobile) should be loaded and is not because doesn’t call related javascripts! However, if I load that file individualy, works as charm.
External link call is not a solution because transitions will then be missed. How to solve it? Thank you.

file call (jquery)

$("#head").append("<a href='"+linkIz+".html' data-role='button'  data-transition='flip'  data-icon="+iconoIz+" >"+textoIz+"</a>");
  • 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-30T19:35:35+00:00Added an answer on May 30, 2026 at 7:35 pm

    Here’s a pretty simple solution. Place all of your site’s JS in an external file, then include that file in every HTML document. That way all the JS for the whole site will be available no matter what page the user landed on your site or if the user refreshes the page.

    Your file could include this to put navigation bars on each page as it is initialized:

    $(document).delegate('[data-role="page"]', 'pageinit', function () {
        $(this).children('[data-role="header"]').append("<a href='" + linkIz + ".html' data-role='button'  data-transition='flip'  data-icon=" + iconoIz + " >" + textoIz + "</a>");
    });
    

    Make sure to use event delegation since you won’t know exactly when any specific page is in the DOM.

    Also I’m assuming that #head is the data-role="header" element for a page, if this is the case then you should change that to .head (class instead of ID) because you can have multiple pages in the DOM at once, so all IDs for the entire website have to be unique. I generally give each data-role="page" element an Id, then I use classes to get more specific within pages, this assures I’m not creating multiple elements with the same ID that can be in the DOM at the same time.

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

Sidebar

Related Questions

Jquery has a great language construct that looks like this: $(document).ready(function() { $(a).click(function() {
jQuery mobile button renders gibberish for filter button after clicking on pagination. Click event
has anyone successfully used the jQuery ui.layout plugin to load jQuery mobile inside the
I am new to phonegap.I am using jquery mobile with html5 for developing android
I've developed a site with jQuery mobile that's running within a Kentico CMS. I
My jQuery Mobile app consists of a single index.html page and contains only one
The jQuery validation plugin breaks for elements that have a HTML5 type defined. $(document).ready(function(){
jQuery Mobile suggests to use tap events instead of click events, as click adds
I working on a multicolumn layout in Jquery Mobile. When the user opens a
I am using 1.0a3 version of jquery-mobile. The problem is that a white space

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.