Closed akulsanthosh closed 4 years ago
`var prev = [] var order = []
function stringcreate(curr){
intersection = curr.filter(x => !prev.includes(x));
if (intersection.length == 1){
order.push(intersection[0])
console.log(order)
}
else{
removed = order.filter(x => !curr.includes(x))
order = order.filter(x => x !== removed[0])
console.log(removed,order)
}
}
$("select").imagepicker( { hide_select : true, clicked: function(s,i){ curr = this.val() stringcreate(curr) prev = curr } } )`
A rough solution. I hope someone implements this
$("select").data("picker").selected_values() returns the values in the order they where initialised, can I get the same in the order they were clicked.
Example :
`
`
On clicking 4 then 1 then 5 $("select").data("picker").selected_values() returns [1,4,5] but is it possible to get [4,1,5]