popbox.js icon indicating copy to clipboard operation
popbox.js copied to clipboard

Initialize new content loaded by ajax

Open Anubarak opened this issue 7 years ago • 0 comments

Is it currently possible to initialize new popups dynamically loaded via ajax without creating a new instance?

When I do

<script type="text/javascript">
  var popbox = new Popbox({
        blur:true,
        overlay:true,
      });
</script>

again the plugin is initialized twice -> all event handlers will execute multiple times instead of just once so I need to unbind all of them. I searched in the code but I wasn't able to spot something useful, do I need to fork it and include the feature on my own?

Anubarak avatar Sep 10 '18 13:09 Anubarak