Answer the question
In order to leave comments, you need to log in
How to make scripts with ajax enabled when returning back in the Bitrix directory?
The problem itself, over which I have been fighting for more than a month. The page contains the bitrix.catalog complex component. In the settings, I enable the use of AJAX-mode with "browser navigation emulation" to connect the "back" and "forward" buttons in the browser. Being in the catalog (catalog.section) I click on any element, in ajax-mode I go to the detailed page - then I press the back button in the browser - I return to the original page with the catalog and Bitrix scripts of the catalog completely fall off. No errors, no reaction, no response. additional JQuery, but "smart filter" with INSTANCE_RELOAD enabled and all other scripts, not related to the catalog.section template - work.
I roughly understand the essence of the problem, that when switching to another page, BX.Ajax reloads and changes the id of the container. Partially solved the problem on jQuery through delegation
$("body").on("click",".catalog .item", function()
{
$(this).addClass("test"); //
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question