////////////////////////////////// HTML
///////////////// After render HTML
////////////////////////////////// Jquery multi selecte
//////////////////////////// Jquery Reset
<select multiple="multiple" id="ddl_Stations" class="multiselect">
<option value="Alagawadi">Alagawadi</option>
<option value="Attigundi">Attigundi</option>
<option value="Balehonnur.M">Balehonnur</option>
<option value="Bannur">Bannur</option>
<option value="Bennur">Bannur</option>
<option value="Chandapur">Chandapur</option>
</select>
///////////////// After render HTML
<li class=""><a
href="javascript:void(0);">
<label
class="checkbox">
<input type="checkbox"
class="ace"
value="Alagawadi"><span class="lbl"></span> Alagawadi
</label>
</a></li>
$(document).ready(function
() {
$('.multiselect').multiselect({
includeSelectAllOption: true,
enableFiltering: true,
maxHeight: 200
});
});
//////////////////////////// Jquery Reset
$(".multiselect
option:selected").prop("selected",
false);
$('.multiselect option').each(function () {
var
input = $('input[value="' + $(this).val() + '"]');
input.removeAttr('checked');
input.removeClass('active');
input.prop('disabled', false);
input.closest('li').removeClass('active');
input.parent('li').removeClass('active');
});
$('.btn-group .dropdown-toggle').text('Select Stations')
No comments:
Post a Comment