Creating your own jQuery Mobile Themes (updated)

Update Oct 6, 2014: The latest version of this is here.

This blog post has been updated with additional findings by Leslie Peaker.

jQuery Mobile comes with three themes: a, b and c. To use different colors, fonts, etc. in your jQuery Mobile controls, you can create your own theme using the ThemeRoller Mobile tool. You can have a different theme for each control, or set up a theme to use on all your controls, giving you a consistent look and feel.

Here’s how to use it:

  1. Use the ThemeRoller Mobile tool to create your theme. It has good docs: no need to repeat them here.
  2. When you’re done, use the Download theme zip file button to get the theme files. In this sample, I’ll call the file GlobalAndD, since it has both global theme settings and a new ‘d’ theme.
  3. Unzip them. Move themes\GlobalAndD.css to your project folder.
  4. Drag GlobalAndD.css from your project folder onto the Project Explorer.
  5. Move the images folder to your project folder.
  6. Add the following line to ‘manifest’ in Project Properties.
  7. images
  8. Now, let’s add a couple of controls to the app and see how it comes out. I added a HeaderBar and a FlipToggle. I changed the theme of the FlipToggle to ‘d’. Here’s how it looks:
  9. So there it is. My theme changes the font to Times, and the background colors to green and red.