F
F
funkydance2021-07-09 09:49:18
JavaScript
funkydance, 2021-07-09 09:49:18

Why does the script stop working when the filter is activated?

Hello.

In the mobile version of the site , the link has a drop-down filter + sorting. They work fine. But, if you select something in the filter once, then the second time the filter and the characteristic do not open. Nothing is hung on these elements when clicked.

60e7f1228f48d577804447.png

60e7f127536cc389373169.png

// Mobile filter
  $(".catalog-filters-mobile__toggle").click(function(){
    $(".catalog-filters-mobile-body").slideToggle(200);
  });


I can't find the reason. Help me please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
funkydance, 2021-07-09
@funkydance

I found the reason. The fact is that in the mobile version the filter was inside the block with products, when the filter was activated, this section was redrawn, and the filter along with it. I had to pull the block with the filter out of this section.

A
Anton Shamanov, 2021-07-09
@SilenceOfWinter

take the code from the theme default 3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question