Open In App
Related Articles

jQuery Mobile Reflow Table classes.cellLabels Option

Improve Article
Improve
Save Article
Save
Like Article
Like

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 Reflow Table classes.cellLabels Option. Using this option, classes can be added to the first cell within each grouped header’s column

Syntax:

<div class="ui-panel-content-wrap-closed">
 // 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=”//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.css” />
<script src=”//code.jquery.com/jquery-3.2.1.min.js”></script>
<script src=”//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.js”></script>

Example: This example describes the jQuery Mobile Reflow Table classes.cellLabels Option.

HTML




<!doctype html>
<html lang="en">
  
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1">
    <link rel="stylesheet"
          href=
"//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.css">
    <script src=
"//code.jquery.com/jquery-3.2.1.min.js">
</script>
    <script src=
"//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.js">
</script>
</head>
  
<body>
    <center>
        <div data-role="page">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1>
            <h3>jQuery Mobile Reflow Table classes.cellLabels Option</h3>
            <div id="log"></div>
            <div data-role="header">
            </div>
            <div role="main">
                <table data-role="table" 
                       id="GFG"
                       data-mode="reflow">
                    <thead>
                        <tr>
                            <th data-priority="1">
                              Company Name
                            </th>
                            <th data-priority="persist">
                              Website
                            </th>
                            <th data-priority="2">
                              Year
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <th>GeeksforGeeks</th>
                            <td>
                              <a href="https://www.geeksforgeeks.org/"
                                data-rel="external">
                              WWW.GeeksforGeeks.org
                              </a>
                            </td>
                            <td>2010</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id="log">
                <h3> classes.cellLabels </h3>
                <h4> Default: "ui-table-cell-label" </h4>
            </div>
        </div>
    </center>
    <script>
        $(document).ready(function () {
            $("#GFG").table({});
        });
    </script>
</body>
  
</html>


Output:

jQuery Mobile Reflow Table classes.cellLabels Option

jQuery Mobile Reflow Table classes.cellLabels Option

Reference: https://api.jquerymobile.com/table-reflow/#option-classes.cellLabels


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 : 07 Feb, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials