Skip to content

Instantly share code, notes, and snippets.

@Ginnw2
Forked from VasiliuKr/bitrix_smart_filter_ajax.js
Last active April 1, 2021 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ginnw2/b9816b72889d63b8bcd0bf8142729078 to your computer and use it in GitHub Desktop.
Save Ginnw2/b9816b72889d63b8bcd0bf8142729078 to your computer and use it in GitHub Desktop.
catalog.smart.filter - ajax обновление списка без AXAJ_MODE
// В шаблоне bitrix:catalog.smart.filter редактируем script.js
//ищим функцию JCSmartFilter.prototype.postHandler и вписываем следующее
$.get(
BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL),
function (data) {
history.pushState(null, null, result.FILTER_AJAX_URL);//подставляем адрес в адресную строку
$('.catalog-list').html($(data).find('.catalog-list').html());
}
);
// .catalog-list - селектор который необходимо обновить. Естественно jQuery должен быть подключен.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment