jQuery('#additional-channels-list select').live('change', function(){
var current_id = parseInt(jQuery(this).val());
select_values.push(current_id);
console.log(select_values);
console.log(jQuery.inArray(current_id, select_values));
});
I want to create multiple select without ctrl, so i need to store values in array. When i trying to check values inArray method returns to me the position of selected element in select list instead of information about current value in array. Where i am wrong?
InArray returns item index, as from jQuery documentation: