Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

In jQuery, how do I check if something is selected vs unselected?

I'm using jQuery 1.11. I have this selector for detecting changes in one of my multi-select menus

$('body').on('change', '.roles', function() {

My question is, within this function, is it possible to tell if the method was called because something got selected as opposed to something getting unselected? If so, how?

Comments