Trap click event on selected options on multi-select with select2

17 Views Asked by At

I have a multi-select and I am using select2. On already selected options (that show with a an X for deletion and the text bubble) I want to trap the event of clicking one of the already selected options (the text bubble). The reason is I want to prompt the user for some other input before anything else happens.

I am using the select2:opening evening and I can trap the opening event but, as far as I can tell, that doesn't give me which option was clicked.

Is there a way to figure out which selected option clicked and prevent opening of the drop down until my "prompt" code executes?

(I am using select2 4.0.1)

enter image description here

0

There are 0 best solutions below