How to create a Closing Popup using jQuery Mobile ? Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be creating a closing popup using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css%E2%80%9D /> <script src=”http://code.jquery.com/jquery-1.11.1.min.js%E2%80%9D></script> <script src=”http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js%E2%80%9D></script> We will create a popup containing a closing button. The closing button can be placed either left-top or right-top or other places based on classes. The popup can be closed by clicking outside of the popup widget or pressing Esc key. The data-dismissible="false" attribute is used to prevent the closing popup when user click outside the popup box. Example 1: We will create a popup containing a close button at top-right corner. HTML <!DOCTYPE html> <html> <head> <link rel="stylesheet" href= "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src= "http://code.jquery.com/jquery-1.11.1.min.js"> </script> <script src= "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"> </script> </head> <body> <center> <h1>GeeksforGeeks</h1> <h4> Design a Popup with right close button using jQuery Mobile </h4> <a href="#CloseRightPopup" data-rel="popup" class="ui-btn ui-corner-all ui-shadow ui-btn-inline"> Popup with Right close button </a> <div data-role="popup" id="CloseRightPopup" class="ui-content" style="max-width:280px"> <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right"> Close </a> <p> It is an example of popup with closing of top-right corner. </p> </div> </center> </body> </html> Output: Example 2: We will create a popup containing a close button at top-left corner. HTML <!DOCTYPE html> <html> <head> <link rel="stylesheet" href= "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src= "http://code.jquery.com/jquery-1.11.1.min.js"> </script> <script src= "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"> </script> </head> <body> <center> <h1>GeeksforGeeks</h1> <h4> Design a Popup with left close button using jQuery Mobile </h4> <a href="#CloseLeftPopup" data-rel="popup" class="ui-btn ui-corner-all ui-shadow ui-btn-inline"> Popup with Left close button </a> <div data-role="popup" id="CloseLeftPopup" class="ui-content" style="max-width:280px"> <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-left"> Close </a> <p> It is an example of popup with closing of top-left corner. </p> </div> </center> </body> </html> Output: Comment More infoAdvertise with us Next Article How to create a basic popup button using jQuery Mobile ? P ppatelkap Follow Improve Article Tags : Web Technologies JQuery jQuery-Misc jQuery-Mobile Similar Reads How to create a basic popup button using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a basic popup button using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ 1 min read How to create a Form Popup using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a form popup using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ href=âh 2 min read How to create a Menu popup using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating menu popup button using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ hr 1 min read How to create a Dialog Popup using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Dialog popup button using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheet 1 min read How to create a Padded Popup using jQuery Mobile ? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be creating a padded popup using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ href 1 min read How to create a Tooltip popup using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Tooltip popup using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ href 1 min read Like