On my page there are 2 dropdowns, one is a regular select for "Cities" and the other one is a multiselect using bootstrap for "Neighborhoods" of each City.
The selected option on the first dropdown will set the options on the second dropdown. I already have it working with regular selects, but with multiselect using bootstrap, I am unable to get the options to change based on the selection.
This is the code I am trying now --
var select_clone = $('<select>')
.html($('#p-nhb option'))
.hide()
.insertAfter('#p-nhb');
$('#p-city')
.change(function() {
$('#p-nhb').html(select_clone.find('[data-val="' + this.value + '"]').clone());
$('.multi-select').multiselect('refresh');
})
.change();
I tried using refresh, which I found out about from HERE However I can not get it to work.