我已经集成了jquery-asmselect,并且希望能够使用页面上的其他链接选择选项。为了形象我想要做的,你可以查看页面here使用链接和asmselect选择选择表单选项
这里是jQuery代码我使用asmselect:
$(document).ready(function() {
$("#CategoryID").asmSelect({
addItemTarget: 'bottom',
animate: true,
highlight: false,
sortable: false
}).after($("<a href='#' class='select-all'>select all neighborhoods</a>").click(function() {
$("#CategoryID").children().attr("selected", "selected").end().change();
return false;
}));
$("#search_SubCategoryID").asmSelect({
addItemTarget: 'bottom',
animate: true,
highlight: false,
sortable: false
}).after($("<a href='#' class='select-all'>select all cuisines</a>").click(function() {
$("#search_SubCategoryID").children().attr("selected", "selected").end().change();
return false;
}));
});
对不起,我不理解。你能否澄清你的意思:“我希望能够使用页面上的其他链接选择选项。” ? –
嘿@AllenZ。 ,在我的页面http://dev.mybrunchi.com上,我想使用左侧的地图链接来定位邻居选择选项。我试过一些其他的JavaScript代码,但它打破了asmselect代码。我正在寻找一种能够保持asmselect功能的解决方案。 – heath1224
谢谢。我明天去看看。 –