Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

select2 tags set value jquery

$('#mySelect').select2({
  data: ['one','two'],
  tags: true
});
$('#mySelect').val(['one','two']).trigger('change')
Comment

Select options of Select2 control based on values using Jquery

$('#mySelect2').val('1'); // Select the option with a value of '1'
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
Comment

get select2 selected value jquery

$('#id :selected').text();
Comment

Select options of Select2 control based on values using Jquery

$('#mySelect2').val(['1', '2']);
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
Comment

select2 set value jquery

$('#inputID').select2('data', {id: 100, a_key: 'Lorem Ipsum'});
Comment

jquery select2 multiple select all

$("#checkbox").click(function(){
    if($("#checkbox").is(':checked') ){
        $("select > option").prop("selected","selected");
    }else{
        $("select > option").removeAttr("selected");
     }
});
Comment

select2 set value jquery

$('#all_contacts').select2('data', {id: '123', text: 'res_data.primary_email'});
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript orderby 
Javascript :: how to get enum item name in javascript 
Javascript :: rounding to nearest hundredth js 
Javascript :: js copy span text to clipboard 
Javascript :: redux dev tools 
Javascript :: react run useeffect only once 
Javascript :: js onclick change styles 
Javascript :: javascript remove underscore and capitalize 
Javascript :: javascript findindex 
Javascript :: font ligature vs code 
Javascript :: javascript get typeof array 
Javascript :: windows terminal vai kill all node js port 
Javascript :: on function change body background image 
Javascript :: window onscroll position fixed position in jquery 
Javascript :: check if element has specific child javascript 
Javascript :: moment get weekday name 
Javascript :: how to display api data in html 
Javascript :: ACCESS IFRAME INNER HTML IN CHROME CONSOLE 
Javascript :: ref css in jsp 
Javascript :: genius api 
Javascript :: how to add css in js 
Javascript :: remove validators angular 
Javascript :: get value of ajax success in variable 
Javascript :: how to read file extension in a folder in node js 
Javascript :: remove all symbols javascript 
Javascript :: generate random date 
Javascript :: promise.allsettled polyfill node 
Javascript :: zoho smtp mail nodejs 
Javascript :: word to char array javascript 
Javascript :: when a form is subbmited jquery 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =