Column Toggle Customization


You can specify the custom options for column toggle table using different classes such as ui-body-c, table-stroke etc.


Following example demonstrates the use of column toggle customization in the jQuery Mobile Framework.

<!DOCTYPE html>
      <title>Table Column Toggle Customization</title>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">
      <link rel = "stylesheet" href = "">
      <script src = ""></script>
      <script src = ""></script>

      <div data-role = "header">
      <table data-role = "table" id = "table_columns" data-mode = "columntoggle" 
         class = "ui-body-c table-stroke ui-responsive" data-column-btn-theme = "d" 
         data-column-btn-text = "Click here to display columns..." data-column-popup-theme = "b">
            <tr class = "ui-bar-a">
               <th data-priority = "1">Position</th>
               <th data-priority = "2">Rating</th>
               <th data-priority = "3">Points</th>
               <td>SOUTH AFRICA</td>
               <td>NEW ZEALAND</td>
               <td>SRI LANKA</td>
               <td>WEST INDIES</td>
      <div data-role = "footer">


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

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

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

Kickstart Your Career

Get certified by completing the course

Get Started