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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:00:04+00:00 2026-06-03T09:00:04+00:00

I have a doubt in jQuery Mobile. I am building a browser page for

  • 0

I have a doubt in jQuery Mobile. I am building a browser page for Android and iPhone. I created both pages in two different HTML files. But i want to have one File and i want to assign the android browser for android page and iphone browser for iphone page and load them accordingly.

Below is the Code

Android

!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
     <title>Android</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
    <link rel="stylesheet" href="my.css" />
    <style>
        /* App custom styles */
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
    </script>
    <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js">
    </script>
</head>
<body>
    <div data-role="page" data-theme="a" id="page1">
        <div data-theme="b" data-role="header">
        </div>
        <div data-role="content">
            <div>
                <h1 class="text-align-center">
                    <b>
                        Apple
                    </b>
                </h1>
            </div>
            <div>

                </div>
            </div>
            <a data-role="button" data-transition="none" data-theme="b" href="http:m.apple.com">
                Go
            </a>
        </div>
    </div>
    <script>
        //App custom javascript
    </script>
</body>

and for iPhone here it is

<!DOCTYPE html>
<html>
<head>
<title>Apple</title>
<!-- the three things that jQuery Mobile needs to work -->
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
    <link rel="stylesheet" href="iphone.css" />
    <style>
        /* App custom styles */
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
    </script>
    <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js">
    </script>
    <script type="text/javascript" src="mobiledetect.js"></script> 

<!-- This is the first page -->
<section id="firstpage" data-transition="flip" data-theme="b" data-role="dialog">
     <div data-role="content">
            <div>
                <h1 class="text-align-center">
                    <b>
                        Apple
                    </b>
                </h1>
            </div>

            <a data-role="button" data-transition="flip" data-theme="b" href="http://m.apple.com">
                Go
            </a>
        </div>

</section>

  • 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-03T09:00:07+00:00Added an answer on June 3, 2026 at 9:00 am
    Make both pages in same document with different ids (androidPage and iosPage) then  
    

    write a a javascript function and call it before loading page. In this function check user agent , if user agent matches to android then load android page and if matches to ios then load ios page.
    User agent string for android ( HTC desire) is

    Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

    and user agent for ios (Iphone) is

    Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7

    you can get user agent in this way

    User Agent

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

Sidebar

Related Questions

I have a doubt in jquery mobile. I have set up a navigation bar.
I have a doubt about orkut's new URL Writing method. Earlier the home page
I have a doubt about the .ready() function in jQuery. In particular, consider a
I am new to Jquery. I have a doubt: For example, in a web
I have to connect to my database from android appication. My doubt is how
i'm new using jquery, and developing for web, and i have this doubt, i
Doubt this is possible as I don't have a 1 page app, but pretty
I am building my first extension and have problems getting background page loaded scripts
I have doubt about this two pattern, like MVC and PAC, which is more
Good afternoon, I have a doubt. I have a div with two input button

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.