N
N
narkesss2018-04-26 14:47:24
css
narkesss, 2018-04-26 14:47:24

Who will explain fancybox?

How to add a class for the body when calling the modal, and when closing, make a callback to remove the class?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2018-04-26
@narkesss

$("#element").fancybox({
    onStart     :   function() {
        $('body').AddClass('active');
    },
    onClosed    :   function() {
        $('body').RemoveClass('active');
    }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question