目前我在filter.tpl文件中有以下JavaScript。这隐藏了精确的搜索按钮,并在复选框点击时过滤产品。但它会在复选框上单击加载整个页面。我想实现AJAX加载器,以便只部分加载页面。
<script type="text/javascript"><!--
$(document).ready(function() {
$('#button-filter').hide();
$('input[name^=\'filter\']').on('change', function() {
filter = [];
$('input[name^=\'filter\']:checked').each(function(element) {
filter.push(this.value);
});
location = '<?php echo $action; ?>&filter=' + filter.join(',');
});
});
//--></script>
&#13;