Example 12:

This example show you how to:

  • Load the plugin
  • Add multiple mSelect's on the same page



HTML :
<select id="country_id" class="mSelect" multiple="multiple"></select>
<select id="state_id" class="mSelect" multiple="multiple"></select>
<select id="city_id" class="mSelect" multiple="multiple"></select>
JS :
$(function () {
    $('#country_id').mSelect({
        url: 'ajax/example12.php?q=countries' //load the contry mSelect
    });

    $('#state_id').mSelect({
        url: 'ajax/example12.php?q=states' //load the states mSelect
    });

    $('#city_id').mSelect({
        url: 'ajax/example12.php?q=cities' //load the cities mSelect
    });
});