jquery-select2 Questions
11
Solved
I am using select2 plugin inside a jquery dialog but in does not work. When dropping down, the focus moves to the input control but immediately get out from it,not allowing me to type anything.
Th...
Shick asked 6/6, 2013 at 15:22
12
Solved
I'm looking for a way to attach a click-event to a select2-result-item.
I've gone ahead and formatted both result and selection via
function format(state) {
if (!state.id) return state.text; // o...
Umeko asked 26/3, 2013 at 11:45
6
Solved
$("#e2").select2("val") returns me the value, but I wan't to get the .$listtypes['name'] . ether from data-name or from the option tag display.
I want to get the option data-name for the selected...
Apian asked 31/10, 2014 at 17:47
2
I think I understand how placeholders work regarding select2 library.
There is a thing bugging me for a while already, how to have non-escaped placeholder on multiple selects.
The reason is I l...
Delamare asked 9/2, 2020 at 21:20
2
I'm in the process of migrating a Rails 5.1.5 project, which uses CoffeeScript, from using sprockets to using webpacker. The project also uses select2.js. With sprockets, I did the following:
Ins...
Defroster asked 21/3, 2018 at 14:48
2
I'm using select2 for multiple value selection. I need to display the drop down list permanently.
Right now when we select or click the input box of select2, the drop down list is displayed. I'd l...
Bedeck asked 14/6, 2013 at 11:57
4
Solved
Explanation
I'm trying to use Bootstrap's form validation with Select2's select boxes, but for some reason, it doesn't work properly. It does show this feedback text, but not the green/red border ...
Criminate asked 4/2, 2019 at 4:10
4
Solved
I've tried to capture select2:clearing event
$("#my-select").on("select2:clearing", function (e) {
console.log('cleared');
});
(jsfiddle)
but it is not fired. I've also tried other versions (l...
Himation asked 21/1, 2015 at 11:0
7
Solved
With select2 dropdown, how do I get a default option to appear if no options match the user's typed input?
$("something").select2({
formatNoMatches: function(term) {
//return a search choice
}
...
Q asked 30/7, 2013 at 14:41
11
I've placed select2 search boxes inside a bootstrap 3 navbar. The issue is when I resize the browser, the search boxes don't auto-resize, and the navbar ends up overflowing. It's not clear to be ho...
Stannite asked 21/5, 2015 at 20:14
4
Solved
I want to sort the select2 options in alphabetical order. I have the following code and would like to know, how can this be achieved:
<select name="list" id="mylist" style="width:140px;">
&...
Northerly asked 27/2, 2015 at 9:56
15
I'm trying to validate select2 field using jquey.validation plugin but nothing happens.
I want to make select required field.
I'm using this custom validation function:
$.validator.addMethod("re...
Herwig asked 23/5, 2014 at 9:7
6
I am using select2 plugin(ivaynberg.github.io/select2). I am trying to display a dropdown(select). It is getting all the items in data.php as options. However select2 is meant to be autocomplete pl...
Kendra asked 24/4, 2013 at 10:52
1
Why select2 disappears when clicked on option results? it uses ajax source data, when search result is clicked the option select disappears.
Select2 version : 4.0.5
jQuery Version : jQuery v1.1...
Jab asked 2/1, 2018 at 14:57
2
Solved
I used Select2 4.0.6, I have a bug like below:
allowClear gives "Uncaught TypeError: Cannot read property 'id' of undefined" when used on select.
How can I fix this bug?.
<!DOCTYPE...
Frumpish asked 21/4, 2018 at 7:32
8
Solved
I just started using project for showing multiple tags from a select box and it works great, thanks for the library.
I just need to modify the color or css of the tags shown in multi-value select-...
Planogamete asked 15/1, 2013 at 14:26
8
I'm using select2 and I'd like to show a multicolum table as a drop down, so I need the width of the drop down container to have a different (larger) width than the input itself
Is it possible to ...
Coquet asked 15/5, 2013 at 3:22
4
Solved
How can I implement input-lg class in a select2 dropdown? I wan't my dropdown to have the same size as an input element having a class of input-lg here's what I have so far
<div class="col-sm-4...
Auriga asked 27/10, 2015 at 10:36
3
Solved
I use this code for insert data to select element with select2 plugin:
$.ajax({
type: "POST",
url: "ws.asmx/GetEvrakGrup",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType...
Useless asked 10/8, 2016 at 12:31
3
Solved
I've been searching through out the net but I can't find a way to validate select2 using parsley, the one discussed here doesn't seem to work Select2 validate and force user to select ast least X i...
Calciferol asked 16/12, 2014 at 1:23
1
Anyone know how to close a Select2 programatically without knowing the ID? Just basically, if there's a Select2 open, close it.
(If someone opens a modal (containing a Select2), opens the dropdown...
Decisive asked 11/10, 2019 at 19:48
2
I'm currently experiencing a very annoying problem with Google Chrome. I have some filters that are a multi-select and when I click to type on those filters, chrome suggests as an autofill option t...
Britneybritni asked 17/5, 2019 at 19:14
2
I want to create a custom dataAdapter for select2 but the examples I see online all make use of AMD. We don't use AMD in our projects. How can I create my custom dataAdapter? A plain object that im...
Anabelanabella asked 1/10, 2015 at 9:53
8
Solved
My Select2 3.4.5 is not working with JSON data.
Here is my input box on HTML:
<input class='form-control col-lg-5 itemSearch' type='text' placeholder='select item' />
…and my JavaScript
...
Terisateriyaki asked 4/1, 2014 at 21:2
2
I am trying to use Select2.js plugin. I have created a fiddle of the simplest example of select2 but i can't figure out why this is not working ?
http://jsbin.com/edeseh/2/edit
you can see in the...
Galop asked 1/4, 2013 at 17:45
© 2022 - 2024 — McMap. All rights reserved.