//initialize the pqSelect widget.$("#select1").pqSelect({ multiplePlaceholder: 'Select Countries', checkbox: true //adds checkbox to options }).on("change", function(){ //save initial value. var oldVal = $("#select1").val() || []; return function( evt ){ var newVal = $(this).val() || [], diff, state; //console.log(oldVal); //console.log(newVal); if(oldVal.length > newVal.length){ state = "unchecked"; diff = $(oldVal).not(newVal).get(); } else{ state = "checked"; diff = $(newVal).not(oldVal).get(); } console.log("diff: ", diff, " state: ", state); oldVal = newVal; }}()).pqSelect( 'open' );