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 Repository Pattern Tutorial from scratch
- How to get latitude longitude from mysql in laravel 5?
- Laravel - Dynamically Add or Remove input fields using JQuery
- How to use groupby having with DB::raw in Laravel Query Builder?
- How to Install Sublime Text Editor 3 in Ubuntu?
- Laravel 5 - Example of Database Seeder with insert sample data
- How to execute artisan commands from route or controller in Laravel ?
- How to increment or decrement a column value in laravel?