Cant open iFrame after using filter

Your Account / Forums / Easy FancyBox Pro / Cant open iFrame after using filter

  • Author
    • August 5, 2018 at 2:07 pm #12456

      Hi, please excuse my bad english!

      A Google Maps map in an iFrame I have made thanks to a post here in the forum. Now I have the problem that the lightbox does not open after using a filter. I think the best way to describe this problem is to use a link. Further down the page you will find the section “Wasser”. Below are entries with a green button called “Karte öffnen”. I can filter over it above (for example “Wasserspielplätze). If I have previously activated a filter, the map will not  open. Is there perhaps a solution for? Thanks in advance.

      Regards Carsten

    • August 5, 2018 at 2:07 pm #12457

      Hi Carsten, I can’t check this live (no link) but it sounds like the filter that you describe, is doing an ajax request or otherwise modifies the page DOM tree on the fly. This will cause the FancyBox script to either not be aware of new content or loose track of existing content (after being moved around). The result is then that links are no longer opening in the light box as expected.

      There is a way to make Easy FancyBox re-scan a page after new content has been added or changed but it depends on the script that is handling the actual filtering request. Do you know which script is responsible? Is it a theme or a plugin script?

      If the theme or plugin is available on then I can do some testing for you. Or I can take a closer look at your live site, if you share a link 🙂 either publicly on this thread or using the contact form (with mention of this thread).

    • August 5, 2018 at 2:07 pm #12460

      Hello Phareo,
      many thanks for your response. I forgot the link, sorry: The plugin for the filters is, a special plugin for the Divi Theme. My page is about the maps (green button (see top post)). I’m not a javascript or Ajax expert and unfortunately I’m completely overwhelmed. Thank you in advance .. Greetings Carsten

    • August 5, 2018 at 2:07 pm #12466

      Hmmm, I tried to find a hook in the script code that we could use but there does not seem to be anything. Does that plugin (or the theme) come with support that you can contact? If so, the question to ask would be: “Is there an event triggered after clicking a filter button?”

    • August 5, 2018 at 2:07 pm #12467

      OK, wait… I might have found a way but you’ll need to add this script to the page:

          window.fancybox_pb_jt_filterable_grid_init = function(){
              var observer = new MutationObserver(function(mutations){
              var config = { attributes: true, childList: true, characterData: true };
              observer.observe(this, config);
          if ( window.et_load_event_fired ) {
          } else {
    • August 5, 2018 at 2:07 pm #12468

      This code needs to be wrapped in script tags when posted in a text widget or inserted in a theme template file. I cannot post these tags on this forum without them being treated as tags (therefor not showing) correctly. But here the are with extra spaces added right after the first character.

      Before the script code:

      < script type="text/javascript">

      After the script code:

      < /script>

      Remove this extra space in each one when adding them in the text widget.

      But if you paste this code in a dedicated theme field meant for javascript, you probably do not want to add these tags!

    • August 5, 2018 at 2:07 pm #12469

      I found a good tutorial about adding code to the page with Divi’s Code Module on (option 1) …

      You’ll need to add one Code Module to each page that has one or more filterable grids.

    • August 5, 2018 at 2:07 pm #12470

      Ok, thanks for your help, the code and the good explanation. I have now installed the code correctly in the head of the page. I hope that’s correct?
      It works, wow. Thank you very much, you helped me a lot. If I can do you something good, let me know!


    • August 5, 2018 at 2:07 pm #12487

      That’s excellent news! Thank you for the feedback. I’m sure others will benefit from this too 🙂

  • You must be logged in to reply to this topic.