I am using select2 library for my search. is there any way to trigger an action after selecting a search result? e.g. open a popup, or a simple js alert.
As per my usage above v.4 this gonna work
$('#selectID').on("select2:select", function(e) { //var value = e.params.data; Using {id,text format} });
And for less then v.4 this gonna work:
$('#selectID').on("change", function(e) { //var value = e.params.data; Using {id,text} format });