Example 19:

This example show you how to:

  • Load the plugin
  • Do something when you open the mSelect: onDropdownShow

HTML:
<select id="country_id" class="mSelect" multiple="multiple"></select>
JS:
$(function () {
    $('#country_id').mSelect({
        url: 'ajax/example1.php',
        onDropdownShow: function() { // callback functions
            // do something here...
            console.log("mSelect opened"); 
            alert("mSelect opened");   
        }
    });
});