Open In App
Related Articles

jQuery Mobile panel open Event

Improve Article
Save Article
Like Article

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


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 06 Jan, 2022
Like Article
Save Article
Similar Reads
Complete Tutorials