0

Info:

I've added a button on my homepage, which triggers a div to expand. The div shows 3 different filters, which you can choose.

The problem is:

After choosing the first filter, the div closes again. To choose the 2nd and 3rd filter, you got to press the button again to expand the div. And the problem happens again when clicking on the 2nd filter.

Question:

How can I prevent closing of my div, while choosing filters?

My code:

$(document).ready(function() {  
    if($(window).width()<768) $("#button-opl").on('click',function(){
        $("#views-exposed-form-attraktioner-block").slideToggle();  
    }); 
});
8
  • Need more info on this? Where is your code related to filters? That is where problem is. Commented Dec 14, 2017 at 13:35
  • Its a modul I use in Drupal. Its set to automatically refresh the filter. but I need to have it on auto.
    – Bel
    Commented Dec 14, 2017 at 13:37
  • So you are saying, that whenever you click filter, page gets refreshed? Commented Dec 14, 2017 at 13:38
  • The page doesnt get refreshed. Its a block or div on the page which gets refreshed.
    – Bel
    Commented Dec 14, 2017 at 13:41
  • Then I would say, question can't be answered with this much of information. Please try to add some more info on this. Commented Dec 14, 2017 at 13:45

0

Browse other questions tagged or ask your own question.