Vertical controlgroup, icon left, mini sized Selectmenu



Description

Include data-mini = "true" attribute in the fieldset to create the horizontal group select menu in the mini size.

Example

Following example demonstrates the use of horizontal controlgroup, mini sized selectmenu in the jQuery Mobile.

<!DOCTYPE html>
<html>
   <head>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">
      <link rel = "stylesheet" href = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
      <script src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
      <script src = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
   </head>
   
   <body>
      <h2>Horizontal Controlgroup mini size Example</h2>
      <fieldset data-role = "controlgroup" data-type = "horizontal" data-mini = "true">
         
         <label for = "select">Select</label>
         <select id = "select" data-native-menu = "false">
            <option value = "#">Maharastra</option>
            <option value = "#">Thane</option>
            <option value = "#">Mumbai</option>
            <option value = "#">Pune</option>
         </select>

         <label for = "select1">Select</label>
         <select id = "select1" data-native-menu = "false">
            <option value = "#">Karnataka</option>
            <option value = "#">Hubli</option>
            <option value = "#">Bangalore</option>
            <option value = "#">Belgaum</option>
         </select>

         <label for = "select2">Select</label>
         <select id = "select2" data-native-menu = "false">
            <option value = "#">Tamil Nadu</option>
            <option value = "#">Madurai</option>
            <option value = "#">Chennai</option>
            <option value = "#">Ooty</option>
         </select>
         
      </fieldset>
   </body>
</html>

Output

Let's carry out the following steps to see how the above code works −

  • Save the above html code as selectmenu_custom_horizontal_controlgroup_mini.html file in your server root folder.

  • Open this HTML file as http://localhost/selectmenu_custom_horizontal_controlgroup_mini.html and the following output will be displayed.

jquery_mobile_widgets.htm
Advertisements