Open In App
Related Articles

jQuery Mobile panel open Event

Like Article
Save Article
Report issue

jQuery Mobile is a JavaScript library built on top of jQuery. It is used to create fast and responsive websites or web applications that are accessible on a variety of devices like mobile, tablets, and desktops.

In this article, we will be using the jQuery Mobile Panel open event that is triggered after the panel has opened completely.

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



  • Initialize the panel with the open callback specified:

      open: function( event, ui ) {
          // Your code here
  • Bind the panelopen event to an event listener:

    $(".selector").on( "panelopen", 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: In the example below, an alert box is opened when the panel open event is fired.


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content=
        "width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    <script src=
        $(document).ready(function () {
                open: function (event, ui) { 
                    alert("Panel open event fired.");
    <div data-role="page">
        <div data-role="header" >
            <h1 style="color:green;">GeeksforGeeks</h1>
            <h3>jQuery Mobile Panel open event</h3>
        <div role="main" class="ui-content">
                <a href="#divID">Open Panel</a>
        <div data-role="panel" id="divID">
            <p>Panel Content</p>



jQuery Mobile panel open Event


Last Updated : 06 Jan, 2022
Like Article
Save Article
Share your thoughts in the comments
Similar Reads