jquery-select2 Questions

10

Solved

I am converting an <input type="hidden"> to a select2 dropdown and feeding it data through the query method $('#inputhidden').select2({ query: function( query ) { query.callback( data ); /...
Altitude asked 10/5, 2013 at 11:8

14

Solved

I am trying to make a select2 box appear in its focused state on page load. I have tried the following: $('#id').select2('focus'); $('#id').trigger('click'); $('#id').trigger('focus'); Only the ...
Gowrie asked 20/5, 2013 at 0:39

7

Solved

I have a list which is of type select2. <select id="list" class="form-control select2 select2-hidden-accessible" tabindex="-1" aria-hidden="true"> <...
Pellegrino asked 7/7, 2015 at 6:10

12

I want to add a button in first element of the list to "Add new item". If user clicks on that button I need to open a pop-up and get the input from users. How to do this in select2 plugin? Is any d...
Katti asked 28/7, 2016 at 12:2

7

Solved

I have a select2 drop-down for which I provide a matcher function. It is initialised like this on initial page load: jQuery(document).ready(function() { jQuery(".my_select2").select2({ matcher: ...
Statue asked 30/4, 2015 at 15:54

8

I have a problem with the jQuery's Select2. When the page loads, if O click on the search result it will select and trigger the event onchange, but only the first time. If I search another time, ...
Caspar asked 18/7, 2013 at 18:55

15

I am trying to use select2 inside bootstrap modal but it is not getting the focus automatically as well as down and up arrows are not working for the populated list. The same select2 works when I ...
Coulson asked 30/12, 2013 at 8:25

8

Solved

In this example of data loaded from a remote source I can see images and other html elements rendered as options. I'd like to accomplish the same thing using data in a local array. I've tried build...
Seagraves asked 1/4, 2016 at 15:59

5

Solved

I'm using select2 in all my projects and it works fine. But in my new project, my select2 input doesn't focus as it should. I have to click on it to focus. What can the problem be and how can I fix...
Soong asked 18/6, 2021 at 6:6

6

Solved

I'm using select2 to present an editable selectbox. When user writes a statement which does not appear in the list(select2, data), I show a button to add this statement to the list. Forcing users...
Squamosal asked 26/12, 2013 at 8:29

8

Solved

I've been banging my head against the wall trying to select a option from a ajax enabled select2 select list with the selenium webdriver. I've managed to get it working with the IE webdriver but no...
Maltose asked 19/7, 2013 at 19:26

6

All the examples online that I see show how to use X-Editable with Select2 library are using older versions of select2. X-Editable - http://vitalets.github.io/x-editable/ with Select2 - https://se...
Eclectic asked 16/5, 2015 at 0:21

6

I am trying to add two select2 multi-value select boxes to my Rails app. The top form works fine, but the bottom one does not work. I experimented with changing ids and adding new js code, but ...

5

I would like to make a multiple input popup with Sweet Alert2, and one of these input fields should be a select with multiple choices . I tried select2 multiple in some pages like in this example: ...
Terrel asked 19/10, 2017 at 8:14

3

Solved

In my select2 select, i need to append li after document is ready, and after appending, how can i reinitialize select2. If I once close and again open the select, the appended data are selectable b...
Spa asked 19/12, 2014 at 7:29

4

Solved

I want to apply select2 to a bunch of jquery elements on the page that all have the same class name but it looks like if i call select2() on an element that already has had a select2() called on it...
Thymelaeaceous asked 24/4, 2015 at 17:38

2

Solved

I want something like the first example here https://material.angular.io/components/select/overview I tried all the methods provide here Select2 change container position . They work , BUT the drop...
Prostatectomy asked 19/10, 2020 at 6:43

3

Solved

I have a forum in which I change the functionality of tab to enter. When the user presses enter the next input field get focus and somehow iImanage to open the select2 select box on focusin event s...
Piero asked 7/6, 2015 at 18:37

5

Solved

I am trying to create a reset button for jquery-select2 multiple select. I have no idea why my solution doesn't work. Html: <select id="workload-selector" class="js-source-states-2" multiple="...
Incise asked 23/1, 2018 at 11:24

2

Solved

I have the following code (javascript): $('#cbxConnections').select2({ minimumInputLength: 0, multiple: false, allowClear: true, placeholder:{ text:"@Diccionario.Connections", id:" @Dicciona...
Orchidectomy asked 13/3, 2015 at 15:9

7

Solved

I am working Select2 Select-box. Problem Placeholder is not showing in select2. It is always show the first option selected in the select2. It's automatically select first option i want to show the...
Farcy asked 11/9, 2017 at 4:40

8

Solved

Using select2 with a Laravel / Vue project and need to return JSON in the following format: [ { id: 0, text: 'enhancement' }, { id: 1, text: 'bug' } ] In Laravel I know I can use pluck to crea...
Partan asked 10/6, 2017 at 16:22

1

I am using Select2 within WooCommerce in some of my own custom areas and I am targeting it with some code to add and removes certain classes and it's working fine except for the SelectWoo instances...

3

Solved

I have 4 select boxes, when I change the first one do some stuff like empty, append and SET the new value for the next one. Because I use select2 just can set it using $.select2('val','value'); J...
Emigrate asked 29/7, 2015 at 2:52

6

Solved

This is what select2.github.io gives you: function addIcons(opt) { if (!opt.id) { return opt.text; } var $opt = $( '<span><img src="/images/flags/' + opt.element.value.toLowerCase() ...
Pilewort asked 26/3, 2015 at 22:59

© 2022 - 2024 — McMap. All rights reserved.