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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:26:24+00:00 2026-06-10T09:26:24+00:00

I have a multi-page template setup. My home screen background color is different from

  • 0

I have a multi-page template setup. My home screen background color is different from the other pages, but I’m finding that some of the content I’m adding into the pages isn’t long enough to reach the footer and I’m seeing the default background color set for the home screen between the background and the footer.

Is there a way to change the ui-page background color for a page before switching to it, so it fills up the gap properly?

I’d considered doing it by delegate for the page:

$(document).delegate("#pageDetail", "pagecreate", function () {
        $('.ui-page').css('background-color', '#ECF2FE');
    });

but that breaks when you hit the back button as it leaves the change in place.

Is there an event I can use to make this change that will fire so I can set the correct background color for each page – or is there a simpler method I’m missing?

Thanks

  • 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-10T09:26:26+00:00Added an answer on June 10, 2026 at 9:26 am

    When the pagecreate event fires, the pseudo-page has not yet been given the .ui-page class, so selecting by that class won’t help you. I suggest using this to select the current pseudo-page instead:

    $(document).delegate("#pageDetail", "pagecreate", function () {
        $(this).css('background', '#ECF2FE');//`this` refers to `#pageDetail`
    });
    

    Also notice I updated the background property rather than background-color. This is because jQuery Mobile uses gradient backgrounds which are specified under the background-image property and you can’t overwrite background-image with background-color.

    Here is a demo: http://jsfiddle.net/WSzq3/ (when you click between pages the background color changes on each pagebeforeshow event)

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

Sidebar

Related Questions

I have a single page template page ( page1.aspx ) which loads a multi-page
i have multi pages pdf,i want to go to the next page of pdf,
I have a multi-page template set up. The first page has a set of
I have a multi page template developed in jquery mobile.The problem I am facing
I have a multi-page form, aka a Wizard pattern, where Page 1 corresponds to
I have a multi-lingual page where I want to display form validation error in
I have a program which prints a multi-page document. The first page is pre-printed
I'm using 'rails3-jquery-autocomplete' gem, but it doesn't have multi column search, but there is
I have a multi page windows phone application. I have a main page and
I have decided to use ASP.NET MVC to develop multi page (registration) forms in

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.