select2 remove item but not remove selected value??

56 views
Skip to first unread message

byki...@gmail.com

unread,
Jan 25, 2017, 9:45:14 AM1/25/17
to select2
if add item no problem but i want remove item not change selected values


my juery code
var foo = [];
$("#serviceId").change(function () {
$('#serviceId :selected').each(function (i, selected) {
foo[i] = $(selected).text();
});
jQuery.ajax({
type: "POST",
url: "@Url.Action("CalculatePrice", "Service")",
data: { values: foo },
dataType: "json",
success: function (result) {
xx = result;
$("#cost").text("Size özel toplam fiyatımız: " + result + " ₺");
}
});

how can i fix it?
Screenshot (15).png
Screenshot (16).png
Reply all
Reply to author
Forward
0 new messages