queue  1596
support custom
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Closing the image by clicking off? [SOLVED]

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    4

    Closing the image by clicking off? [SOLVED]

    Is there a way to close the enlarged image when a person clicks outside of the image bounds, instead of forcing them to use the "X" or hitting <esc>?

  2. #2
    Junior Member
    Join Date
    Mar 2013
    Posts
    4

    Bump

    Nothing? Not even a "sorry, there's no way to accomplish that"?

  3. #3
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    12,963
    Hey there, sorry but I somehow missed your question.

    At first that feature was enabled, but it was behaving very bad on mobile phones so we disabled it.

  4. #4
    Junior Member
    Join Date
    Mar 2013
    Posts
    4
    Thanks! I don't suppose there's any way of enabling it only on desktop browsers?

  5. #5
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    12,963
    Sure there is, open jQuery.pixelentity.flare.min.js

    Find this:
    Code:
    .delegate(".peFlareLightboxThumbs span","click",o)
    after that paste this:
    Code:
    .delegate(".peFlareLightboxContent > div > div","click",aR)

  6. #6
    Junior Member
    Join Date
    Mar 2013
    Posts
    4
    That works great! Thanks!

  7. #7
    Ante,

    I tried above code addition but clicking outside the image doesn't do anything with the above code included.

    Any ideas if this has changed in a newer version on how to accomplish this.

    Thx in advance

    Marcellino

  8. #8
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    12,963
    Hi, are you sure you are including the minified file when you modify it?

  9. #9
    Yes, added it to the minified file:

    .delegate(".peFlareLightboxThumbs span","click",q).delegate(".peFlareLightboxContent > div > div","click",aR);

  10. #10
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    1,880
    This can be done without altering the plugin code, just add in the same page where flare is used

    PHP Code:
    <script type="text/javascript">
    jQuery(function ($) {
        $(
    "body").delegate(".peFlareLightboxCaptions,.peFlareLightboxOverlay","click",function () {
            $(
    "#peFlareLightboxControlClose").trigger("click");
        });
    });
    </script> 
    My cave is full of servers