I am trying to fire a change event for chosen js. The <select> is getting updated but when chosen.change is fired. The variable is undefined. If i manually select something from the select the variable is defined. It fires when I use the select box but not when the page loads after I fire $('#js').val('Dojo Toolkit').trigger('chosen:updated');. I created a fiddle.
$(".chosen-select").chosen().change(function(evt,params) {
console.log(params);
});
$(".chosen-select").chosen({width: "20%"});
$('#js').val('Dojo Toolkit').trigger('chosen:updated').change();