Browse Source

Return the `filter` option (for ajax)

pull/165/head
Jānis Skarnelis 3 years ago
parent
commit
244d278eba
  1. 8
      src/Fancybox/Fancybox.js

8
src/Fancybox/Fancybox.js

@ -836,8 +836,14 @@ class Fancybox extends Base {
$content.appendChild($fragment);
}
if (slide.filter && !slide.error) {
$content = $content.querySelector(slide.filter);
}
if (!($content instanceof Element)) {
throw new Error("Element expected");
this.setError(slide, "{{ELEMENT_NOT_FOUND}}");
return;
}
// * Add class name indicating content type, for example `has-image`

Loading…
Cancel
Save