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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:47:43+00:00 2026-05-26T10:47:43+00:00

With jQuery Mobile I can create a page using a custom theme <div data-role=page

  • 0

With jQuery Mobile I can create a page using a custom theme

<div data-role="page" data-theme="s" id="home">...

Now this works, but requires that I add this line in each of my pages and every-time I add a new page. I tried adding data-theme="s" to the body tag but this has no affect. Is there any way to do this other then setting it manually per page?

  • 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-26T10:47:44+00:00Added an answer on May 26, 2026 at 10:47 am

    You would have to do it programmatically, AFAIK.

    Something along the lines of:

    $(document).bind( "mobileinit", function () 
    {
        ...
        $.mobile.page.prototype.options.contentTheme = "z"; //your theme
        ...
    });
    

    Now, since there is no centralized hook – you will have to do the similar line for all theme options there are:

    $.mobile.page.prototype.options.headerTheme
    $.mobile.page.prototype.options.footerTheme
    

    and so on.

    I don’t have a list of all of them, but a quick look through the jquery.mobile-1.0rc1.js searching for .prototype.options. reveals these:

    $.mobile.page.prototype.options.backBtnTheme
    $.mobile.page.prototype.options.headerTheme
    $.mobile.page.prototype.options.footerTheme
    $.mobile.page.prototype.options.contentTheme
    $.mobile.listview.prototype.options.filterTheme
    

    so it seems to me that you can go with these and discover more as you go. Note that not all of them are created like that – some are constructed dynamically in the code. Look for Theme string to see what I mean.

    Update

    $.mobile.page.prototype.options.theme should be updated as well – based on Moak’s comment below.

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

Sidebar

Related Questions

I can run this code in Android app (using PhoneGap adn jQuery Mobile) but
With jQuery mobile I'm using a dynamic 'page' template with custom content inserted depending
I a using jquery mobile to create a mobile web page. I defined a
I'm using Jquery Mobile to create a mobile app in combination with phonegap. Now
Can someone recommend a good Mobile UI Javascript/jQuery framework that works well with both
i'm trying to create a modal dialog with jquery mobile rc2. This is my
I have a dynamically added list on the home of my jQuery Mobile Page.
I'm using jQuery Mobile to create a mobile (obviously) website. I have a list
I'm using jQuery Mobile to create a site which will display an embedded YouTube
I'm trying to create a mobile version of my views using jQuery Mobile, but

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.