Example 15:

This example show you how to:

  • Load the plugin
  • Custom the Name of the columns
  • Add more than 1 columns for the mSelect
  • Custom the width of the mSelect dropdown container
  • Custom the lengthMenu
  • Custom the column order

HTML :
<select id="state_id" class="mSelect" multiple="multiple"></select>
JS :
$(function () {
    $('#state_id').mSelect({
        url: 'ajax/example11.php',
        columns: ['State Name', 'Country Name', 'Phone Code'],
        minWidth: 600,
        lengthMenu: [5, 10, 50, 100],      
        order: [[2, 'asc']] // order by Country Name
    });
});