到目前为止,我有以下有效的代码:
<a href="#" class="select_brand" onclick="$('#filter_brand').val('aerowatch');$('#filter_brand').selectmenu('refresh', true); $('#popup_brand').popup('close'); " class="ui-btn ui-btn-icon-right ui-icon-carat-r">Aerowatch</a>
我要替换为:
// select element
$(".select_brand").on("mousedown", function(e){
$('#filter_brand').val(e);
$('#filter_brand').selectmenu('refresh', true);
$('#popup_brand').popup('close');
}
这在语义上似乎是错误的。该怎么办?