Skip to content
Related Articles

Related Articles

jQuery Mobile Dialog overlayTheme Option

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 26 Jan, 2022

jQuery Mobile is a web-based technology designed to make responsive websites and apps that are accessible on all smartphone, tablet, and desktop devices. Dialog is used as a pop-up & can be used on any page to convert it into a modal dialog.

In this tutorial, we are going to learn the jQuery Mobile Dialog overlayTheme Option. The dialog always appears over an overlay layer whose colour scheme can be set with the help of the overlayTheme option.

Syntax: The overlayTheme option takes a single character from a-z where each character represents a color scheme. The option is initialized as follows:

    overlayTheme: "b",
  • Get the overlayTheme option

    var overlayThemeOpt = $("#gfgDialog")
        .dialog("option", "overlayTheme");
  • Set the overlayTheme option

    $("#gfgDialog").dialog("option", "overlayTheme", "b");

CDN Links: Use the following CDN links for the jQuery Mobile project.

<link rel=”stylesheet” href=”” />
<script src=””></script>
<script src=””></script>

Example: In the following example, we have set the overlayTheme option to dark using character “b”.


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible"
          content="IE=edge" />
    <meta name="viewport" 
          content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" 
    <script src=
    <script src=
    <div data-role="page" id="gfgpage">
        <div data-role="header">
            <h1 style="color: green;">
        <div data-role="main" class="ui-content">
            <h3>jQuery Mobile Dialog overlayTheme option</h3>
                <a href="#gfgDialog" data-rel="dialog">
                    GeeksforGeeks dialog
    <div data-role="page" 
        <div data-role="header">
        <div role="main" class="ui-content">
            <p>Programming Tutorials Website</p>
                <li>Data Structures</li>
                <li>Web Development</li>
        overlayTheme: "b",
        theme: "b",


jQuery Mobile Dialog overlayTheme Option

jQuery Mobile Dialog overlayTheme Option


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!