jquery-select2 Questions
7
Solved
I am working on a requirement that I have to clear a select2 dropdown box after form submission through ajax. I have searched & tried few solutions but didn't work though.
my select2 code is:
...
Diggins asked 22/3, 2017 at 12:6
10
Solved
I want to change the font-size of one of my select boxes. But it is not working:
http://jsfiddle.net/jEADR/3717/
<link href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.2/select2.css" rel...
Humming asked 14/3, 2017 at 14:20
9
I am a developing a Ruby On Rails app using Rails 4.2.6. I am using Turbolinks alongside jquery.turbolinks (sorry I could'nt post the links to those elements as I am a newbie on the site). My probl...
Achaean asked 8/4, 2016 at 10:46
8
Solved
I am using Select2 drop down and I need to do some functionalities based on the the drop down selection.
I have tried the following code, but it didn't worked for me.
$eventSelect.on("select2:se...
Drue asked 24/6, 2017 at 10:17
6
Solved
I'm trying to use the select2 with an input group, but the button is always on the next line after the select2 control. If you remove the select2 class it works as expected. Why does the select2 bo...
Passionate asked 21/6, 2019 at 16:16
2
I'm using select2, When someone select value in select dropdown. select2 added data-select2-id in to all div that come before select2, not same data-select2-id value but increase each time.
have a ...
Ordinary asked 15/9, 2020 at 16:22
9
Solved
I have two selects that are linked: Each value of the first select determines which items will be displayed in the second select.
The values of the second select are stored in a two-dimension arra...
Julissajulita asked 7/11, 2012 at 10:46
10
Solved
I have select2 multi select field in my form where I want to remove the selected option from the dropdown list after it is selected and again add it to the list if it is removed from the list. And ...
Pastypat asked 17/4, 2016 at 22:26
6
Update:
I added this:
$("#id_project").select2({dropdownParent: $(".modal-body")});
...and this causes the dropdown to be correctly placed, and the search can be typed into. Un...
Estellaestelle asked 12/2, 2018 at 21:25
4
http://jsfiddle.net/tXFbk/2/
HTML:
<div class="control-group">
<label for="some_id" class="control-label">Some ID</label>
<div class="controls">
<input type="text" i...
Impetuous asked 20/2, 2013 at 9:15
8
Solved
I am trying to use select2 on a webpage I am creating. However the combobox background seems to be transparent but I need to change it to another color. I tried modifying the select2.css file but n...
Eggshaped asked 21/7, 2013 at 11:25
0
I'm trying to use the select2 with an input group in AdminLTE v3.2.0, but the button is moved to the next line after the select2 control.
Anyone has experienced this?
I noticed that the issue doesn...
Scaler asked 28/4 at 18:43
4
Solved
I have a select 2 provided in this JSFIDDLE. How can I onselect an option call All it will select all of the option inside that select field except for itself, meaning the All option is more like a...
Klutz asked 27/12, 2017 at 3:30
6
Solved
I'm using select2 and fetching available options from the server with this query function
var recipientsTimeout;
this.loadRecipients = function (query) {
clearTimeout(recipientsTimeout);
recipie...
Roussillon asked 13/1, 2014 at 17:25
9
Solved
How do I change the data placeholder with select2?
So far I've tried this.
$("#city").select2({placeholder:"foo"});
And this...
$("#city").attr("data-placeholder","bar");
But neither works.
...
Munificent asked 28/9, 2013 at 3:34
2
Solved
Did someone get select2 4.0 working with bootstrap 3.x tooltips? I can't display tooltips in select2 4.0 anymore (worked well in 3.5.2). This is HTML code:
<select name="xxx" class="select-full...
Martineau asked 11/8, 2015 at 12:9
4
Solved
I want to prevent from adding a category to the Select2 element if it fails creating the row first in my db. The action is not prevented when i call ev.preventDefault(); Nothing happens.. what is w...
Greff asked 2/11, 2014 at 22:18
36
Solved
This belong to codes prior to Select2 version 4
I have a simple code of select2 that get data from AJAX.
$("#programid").select2({
placeholder: "Select a Program",
allowClear:...
Enteron asked 7/8, 2014 at 16:45
6
Solved
How do you disable the "No matches found" text on autocomplete on select2/Tagging Support?
This is what I have now:
$('#ProductDescriptions_30_keywords').select2({
tags:[],
tokenSeparators: [",...
Cadet asked 27/8, 2013 at 16:27
7
Solved
_header.html.erb (for forms part)
<%= form_for home_path, class: 'home', role: 'search', method: :get do |f| %>
<div class="form-group" style="display:inline;">
<div class="input-g...
Epigone asked 3/1, 2017 at 11:30
3
Solved
I'm using the select2 plugin with the property maximumSelectionSize: 1. After selecting 1, there is an event still on the form that allows the user to click on the outside of the box and a message ...
Delete asked 15/1, 2015 at 15:22
10
Solved
I know that "readonly" feature does not exist for select2. Please check here.
How do I achieve that?
Any help would be appreciated.
Thanks.
Note: I cant use disabled. If I use disabled, I will not...
Dextrorse asked 27/2, 2018 at 11:5
16
Solved
To get the chosen value of a select2 I'm using:
var x = $("#select").select2('data');
var select_choice = x.text
The problem is this throws an error if not value has been selected and I was wond...
Cleocleobulus asked 28/1, 2014 at 18:0
10
Solved
How can I dynamically make a select2 combobox read-only?
Here's what I've tried so far:
$('...').attr({'readonly': 'readonly'}).trigger('change.select2');
$('...').attr({'readonly': 'readonly'})....
Stereobate asked 23/1, 2017 at 13:4
5
Solved
I've seen a lot examples of Select2 option tags set with "data-" attributes and I would like to do it.
I'm using ajax to get the data. I get the ID and the TEXT needed to build the select.
But...
Estrus asked 26/11, 2015 at 13:54
1 Next >
© 2022 - 2024 — McMap. All rights reserved.