Questions tagged as 'select2'

1
answer

create a lock class for select2 that can not be deleted

I am trying to create a class .lock that can not be deleted. The idea is to make the option element that has this class not be possible to erase it. I managed to make the class transparent between the elements, but I can not d...
asked by 17.10.2017 / 17:59
2
answers

Reset Form with jquery, empty input error Select2 delete the list

I am using the following code: $('#formarea')[0].reset(); This allows me to reset a form but in some cases it does not do it with the data that has been written with ajax or elements added with ajax. I also empty the display none fields,...
asked by 11.07.2017 / 17:14
2
answers

Change the value of the select2 with JQuery [duplicated]

HELP Hello, I need to know how I can change the value of a .select2 . That is, when I give it to the edit button, I have to fill in all fields filled in all the fields except the select2 WHEN WHEN I DECIDE YOU TO EDIT...
asked by 21.06.2017 / 21:34
1
answer

Error with slice select2.js

I'm having trouble filling out a combobox with Select2 I have my JS: $("#comboplatos").select2({ placeholder: "Type to select a sponsor", minimumInputLength: 3, allowClear: true, style: "display: inline-block", width:...
asked by 19.06.2017 / 08:07
1
answer

Select2 multiple just choose a value

Good afternoon guys, I'm working with a multiple select2, the problem I have is that when inento changes the value of the element (which should be 3 items) this only chooses the first of the array, here my code: Creation of the select2 elemen...
asked by 30.04.2017 / 20:42
0
answers

Problem with multiple multiple select2 in tabs within asp.net web forms

Within an asp.net web forms form I have implemented the select2 multiple plugin, at the moment of scrolling within the page the element loses the style and is known in the way it is shown in the image, some way of solving the problem?...
asked by 17.02.2017 / 00:33
1
answer

is it possible to know when a selected element is deleted in select2 with jquery? [closed]

I have a select2 with several options selected, the question is, when I remove one of those elements can I know with jquery the event or how to know that the element is being removed?     
asked by 04.11.2016 / 06:40
1
answer

How can I add data-attributes to the options using the jQuery Select2 framework?

This is what I have $( "#codigo" ).select2({ ajax: { url: "getEmpleados.php", dataType: 'json', delay: 250, data: function (params) { return { q: params.term // search term }; }, proc...
asked by 06.03.2017 / 21:23