Share this post:
If you require to set selected value in Chosen Jquery Plugin then you can done using val() with trigger(). Some days ago, i had worked my php project i needed to set selected value wiht chosen and also multiple selected value both. After some try i found how to do with if set single selected value using val().
But i was confuse with dropdown multiple selected value, but at last i found how to give value, we have to just pass array in val(). As bellow i mention both way how could done.
Set Single Value:
var my_val = 3;
Set Multiple Value:
var my_val = 3,4,6;
var str_array = my_val.split(',');
- Laravel 5 import export to excel and csv using maatwebsite example.
- PHP - Bootstrap autocomplete tokenfield with Ajax Example
- Laravel 5 database backup using Laravel Backup Package
- PHP download file from url using curl example
- How to get Instagram followers count using JQuery Ajax?
- How to add charts in Laravel 5 using Chart JS ?
- Laravel 5 - generate PDF from html view file and download using dompdf
- How to set ANDROID_HOME environment variable in ubuntu?