Open In App

How to make a Mini sized vertical controlgroups using jQuery Mobile ?

jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be making a Mini sized vertical controlgroups using jQuery Mobile.

Approach:



Example 1: In this example, we will be using Button for grouping buttons.






<!DOCTYPE html>
<html>
  
<head>
    <link rel="stylesheet" href=
  
    <script src=
    </script>
      
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
  
        <h4>
            Mini controlgroup button 
            using jQuery Mobile
        </h4>
    </center>
  
    <div data-role="controlgroup">
        <button data-role="button" 
            data-mini="true">No icon
        </button>
          
        <button data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="left" 
            id="gfg">Left
        </button>
          
        <button data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="right" 
            id="gfg">right
        </button>
          
        <button data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="top" 
            id="gfg">top
        </button>
          
        <button data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="bottom" 
            id="gfg">bottom
        </button>
          
        <button data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="notext"
            id="gfg">icon only
        </button>
    </div>
</body>
  
</html>

Output:

Example 2: In this example, we will be using Anchor for grouping buttons.




<!DOCTYPE html>
<html>
  
<head>
    <link rel="stylesheet" href=
  
    <script src=
    </script>
  
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
  
        <h4>
            Mini controlgroup anchor 
            using jQuery Mobile
        </h4>
    </center>
  
    <div data-role="controlgroup">
        <a href="https://www.geeksforgeeks.org/" 
            data-role="button" data-mini="true">
            No icon
        </a>
          
        <a href="https://www.geeksforgeeks.org/" 
            data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="left">
            Left
        </a>
          
        <a href="https://www.geeksforgeeks.org/" 
            data-role="button" data-icon="delete"
            data-mini="true" data-iconpos="right">
            right
        </a>
          
        <a href="https://www.geeksforgeeks.org/" 
            data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="top">
            top
        </a>
          
        <a href="https://www.geeksforgeeks.org/" 
            data-role="button" data-icon="delete" 
            data-mini="true" data-iconpos="bottom">
            bottom
        </a>
          
        <a href="https://www.geeksforgeeks.org/" 
            data-role="button" data-icon="delete"
            data-mini="true" data-iconpos="notext">
            icon only
        </a>
    </div>
</body>
  
</html>

Output:


Article Tags :