Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery Mobile Popup disable() Method

  • Last Updated : 22 Dec, 2021

jQuery Mobile is a set of HTML5 based user system interaction widget toolbox used for various purposes build on top of jQuery. It is designed to build fast and responsive sites accessible to mobile, tabs, and desktops. 

In this article, we will learn about the Mobile Popup disable() method. A popup is used to show some data when a link has been clicked. The disable() method is used to disable the popup when a link is clicked.

Syntax:

$('selector').popup('disable');

Parameters: This method does not accept any parameters.

 

CDN Links: First, add jQuery Mobile scripts needed for your project.

<link rel=”stylesheet” href=”//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css”>
<script src=”//code.jquery.com/jquery-1.10.2.min.js”></script>
<script src=”//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js”></script>

Example: This example describes the uses of jQuery Mobile Popup disable() method.

HTML




<!doctype html>
<html lang="en">
  
<head>
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
  
    <script>
        $(document).ready(function () {
            $( "#GFG" ).popup( "disable" );
        });
    </script>
</head>
  
<body>
    <div data-role="page" id="page1">
        <div data-role="header">
            <h1>GeeksforGeeks</h1>
            <h3>jQuery Mobile Popup  disable() method</h3>
        </div>
        <br>
  
        <center>
            <div role="main" class="ui-content">
                <a href="#GFG" data-rel="popup">
                    GeeksforGeeks
                </a>
                <div data-role="popup" id="GFG">
                    <p>
                        A Computer Science portal for geeks.
                    </p>
                </div>
            </div>
        </center>
    </div>
</body>
  
</html>

Output:

Reference: https://api.jquerymobile.com/popup/#method-disable


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!