Доброго времени суток. Помогите плиз. Не работает поиск на сайте salut.qdes.ru (не реагирует ни на кнопку ни на Enter). На сайте используется шаблон Unishop.
Кусок header.tlp
<div id="search" class="col-xs-12 col-sm-6 col-md-<?php if($menu_type == 1) { ?>5<?php } else { ?>4<?php } ?> col-lg-5 hidden-sm col-md-pull-4"><?php echo $search; ?></div>
в commom.js
$('body').on('click', '#search ul li', function () {
$('#search .cat_id button span').text($(this).text());
$('#search input[name=\'filter_category_id\']').val($(this).attr('data-id'));
$('#search .cat_id button span').css('width', 'auto');
$('#search .cat_id button span + span').remove();
if ($('#search .cat_id button span').width() > 90) {
$('#search .cat_id button span').css('width', 90).after('<span>...</span>');
}
});
$('body').on('click', '.search', function() {
url = $('base').attr('href') + 'index.php?route=product/search';
var value = $(this).parent().parent().find('input[name=\'search\']').val();
if (value) {
url += '&search=' + encodeURIComponent(value);
}
var filter_category_id = $(this).parent().parent().find('input[name=\'filter_category_id\']').val();
if (filter_category_id > 0) {url += '&category_id=' + encodeURIComponent(filter_category_id);}
location = url;
});
$('body').on('keydown', '#search input[name=\'search\']', function(e) {
if (e.keyCode == 13) {
$(this).parent().find('button.search').trigger('click');
}
});
$('#search_phrase a').on('click', function() {
$(this).parent().prev().find('.form-control.input-lg').val($(this).text());
$(this).parent().prev().find('.search').trigger('click');
});
Сломал всю голову...