D
D
Diversia2020-05-12 09:51:46
fancyBox
Diversia, 2020-05-12 09:51:46

How to prevent fancybox from closing when clicking outside the window?

Hello. I can't figure out how to prevent fancybox from closing when clicking outside its window, and leave it only when clicking on the cross. The documentation https://fancyapps.com/fancybox/3/docs/#options does not contain this answer. Please help with a solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Diversia, 2020-06-23
@Diversia

$(document).on('click', 'a.play', function(e) {
  $.fancybox.open({
    src: $('#fancybox-modal'),
    type: 'inline',
    clickSlide : 'false',
    clickOutside : 'false',
    touch: false
  });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question