Open In App

jQuery Mobile panel classes.animate Option

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

jQuery Mobile is a web-based technology that can be used to make responsive content for websites that can be accessed on all types of smartphones, tablets, and desktops.  

In this article, we will learn how to use the jQuery Mobile panel classes.animate Option. Using this option, classes can be added to the panel, page contents wrapper, and fixed toolbars when option animate is true and the 3D transform feature test returns true.

Syntax:

<div class="ui-panel-animate">
// content
</div>

Parameter: This option does not accept any parameter/argument.

Return Type: This option does not return any value.

CDN Link: Below are some jQuery Mobile scripts that will be needed for your project so add these to your project.

<link rel=”stylesheet” href=”https://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css” />
<script src=”https://code.jquery.com/jquery-1.9.1.min.js”></script>
<script src=”https://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js”></script>

Example: This example describes the jQuery Mobile panel classes.animate Option.

HTML




<!doctype html>
<html lang="en">
  
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content=
         "width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
</head>
  
<body>
    <center>
        <div data-role="page">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1>
            <h3>jQuery Mobile panel classes.animate Option</h3>
            <div data-role="main" class="ui-content">
                <a href="#gfgpanel1" data-role="button">
                   Open Panel 1</a>
                <a href="#gfgpanel2" data-role="button">
                   Open Panel 2</a>
                <br>
                <h2> classes.animate </h2>
                <h3> Default: "ui-panel-animate" </h3>
            </div>
            <div data-role="panel" id="gfgpanel1" 
                 class="ui-panel-animate">
                <div class="panel-content"></div>
                <h2>Welcome to GeeksforGeeks</h2>
                <p>Panel animate option is false</p>
  
        
                <a href="#" 
                   data-rel="close" 
                   data-role="button">
                   Close panel</a>
            </div>
            <div data-role="panel" 
                 id="gfgpanel2" 
                 class="ui-panel-animate" 
                 data-position="right">
                <div class="panel-content"></div>
                <h2>Welcome to GeeksforGeeks</h2>
                <p>Panel animate option is true</p>
  
        
                <a href="#" 
                   data-rel="close" 
                   data-role="button">
                  Close panel</a>
            </div>
        </div>
    </center>
      
</body>
  
</html>


Output:

jQuery Mobile panel classes.animate Option

jQuery Mobile panel classes.animate Option

Reference:  https://api.jquerymobile.com/panel/#option-classes.animate



Last Updated : 07 Feb, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads