Using davidstutz’s bootstrap-multiselect plugin with twitter bootstrap 3.3.0.
http://davidstutz.github.io/bootstrap-multiselect
My purpose is that when i click on the dropdown, i’d like to get a radio button selected, but it doesn’t work.
HTML (blade):
{{Form::radio('radio', 'value', null, array('id' => 'radioID' ,'class' => 'name', 'autocomplete' => 'off'))}}
{{Form::select('select', $valuesArray,'', array('id' => 'selectID' ,'multiselect' => 'multiselect', 'class' => 'msdropdown', 'multiple' => 'multiple', 'autocomplete' => 'off'))}}
JS:
$(document).ready(function(){
$('#selectID').multiselect({
onDropdownShow: function(event){
$('#radioID').prop('checked', true);
}
});
});
Thanks in advance.
————Update————-
The problem was it was duplicately initialized, before the (‘#selectID’) section. I removed first one and it worked like a charm.
2
Answers
Its
onDropdownShown
notonDropdownShow
Source
try Each operation like this :