Consider simple multiple select box
<select name="waste" id="waste" multiple>
<option value="5">garbage</option>
<option value="6">food</option>
<option value="8">Tin</option>
<option value="9">Can</option>
</select>
All it does is fire change event
$('#waste').change(function(){
//Inside here how will I know that this event was fired when user removed some values from selection
// or did he added more values in selection
});
try this example : http://jsfiddle.net/7rf9J/
I’ve enclosed your function in an immediate self execute function in which I declared a variable containing the number of selected items. Every time you add o remove an item I save the current length of the value (initially set to 0), so you know if you added, removed or changed selection.