close fullscreen mode

permute's Avatar


28 Apr, 2018 04:51 AM

searching for a possibility to close the fullscreen mode by clicking outside the image
HTML version

  1. Support Staff 1 Posted by Dmitry Semenov on 28 Apr, 2018 03:00 PM

    Dmitry Semenov's Avatar


    Depending on your slide structure, you can try something like:

    $('.royalSlider').click(function(e) {
        if ( $('rsSlide') ) {

    Also, make sure that options like navigateByClick are set to false.

  2. 2 Posted by permute on 30 Apr, 2018 06:40 AM

    permute's Avatar

    hallo dmitry,
    thanks for the quick answer, but you got me wrong.
    I try to CLOSE the fullscreen by clicking in the background, NEAR the image.
    like clicking on magnific-popup mfp-bg class.

  3. Support Staff 3 Posted by Dmitry Semenov on 30 Apr, 2018 08:05 AM

    Dmitry Semenov's Avatar

    Well, the above code closes the fullscreen. If the image is not the root element of your slides, you'll need to modify rsSlide in above code with a class of root element.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac