Accessing Select2 Close event
Accessing Select2 Close event
I wonder if you can help out with my JS issue.
I am using select2 box in Editor. I want to capture the value of the clicked item and execute some JS before the user clicks on the submit button. Do you know how I can capture this event:
For example, I would like to do this:
.on('select2:close', function() {
var itemclicked= $(this);
alert (itemclicked.val());
}
etc
Many thanks for your input.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Ronnie ,
You should be able to use
dependent()
- the change of value will give you an opportunity to run your code there. See example here.Cheers,
Colin