我有一个多选列表框
@Html.ListBoxFor(model => model.DealerScopeDealerProvider.DealerScopeProvider, new MultiSelectList(providers, "ProviderCode", "ProviderName"), new { id = "providerfilter" })
$('#providerfilter').multiselect({
search: true,
selectAll: true,
});
它呈现这样的HTML:
<select id="providerfilter" multiple="multiple">
<option></option>
</select>
<div>
<a href="#" class="ms-selectall global chkimg">Select all</a>
<a href="#" class="ms-unselectall global unchkimg">Unselect all</a>
<a href="#" class="crosimg"></a>
</div>
我想知道用户是否选择了全选选项。如何使用 jquery 实现这一点?