Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

jQuery Mobile Popup create Event

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

jQuery Mobile is a set of HTML5 based user interface systems developed to create responsive content for mobiles, tabs, and desktops. It is built on top of jQuery. In this article, we will be using the jQuery Mobile Popup create event which triggers when the popup is created.

Callback Parameters: The callback function accepts an event parameter of type event and a UI Object. The UI object is empty, it is included for consistency with other events across the jQuery Mobile library.


  • Initialize the popup with the create callback specified.

       create: function( event, ui ) {
          // Your code here
  • Bind an event listener to the popupcreate event.

    $(".selector").on( "popupcreate", function( event, ui ) {} );

Parameters: It accepts a callback function that holds two parameters.

  • event: It accepts event type value.
  • ui: It accepts Object type value. The ui object can be empty but used for consistency with other events.

CDN Links:

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

Example: The below example demonstrates the use of Popup create event.


<!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" />
    <title>Popup - create Event</title>
    <link rel="stylesheet" href=
    <script src=
    <script src=
    <div data-role="page">
            <h2 style="color:green">GeeksforGeeks</h2>
            <h3>jQuery Mobile Popup create Event</h3>
            <p id="target">Popup will open here</p>
            <div data-role="popup" id="popup1">
                <p>Welcome to GeeksforGeeks</p>
            <button style="width: 450px;" onclick="openPopup()">
                Open Popup
        // Popup create event.
            create: function (event, ui) {
                alert("Popup create Event triggered");
        // A function to open the popup.
        function openPopup() {
            $("#popup1").popup("open", { positionTo: "#target" });


jQuery Mobile Popup create Event


My Personal Notes arrow_drop_up
Last Updated : 07 Jan, 2022
Like Article
Save Article
Similar Reads
Related Tutorials