0

http://jsfiddle.net/warrenkc/svsdx/5440/ see my code so far.

$(document).ready(function () {
    $("#single").fancybox();
    $("#demo-2").loupe();
});

I am looking to add an image magnifier such as loupe to the enlarged image popup from FancyBox. (Useful for users with lower screen resolutions when large images are shrunk by browser)

Does anyone know how to do this? Thanks!

user1605822
  • 99
  • 3
  • 14

1 Answers1

0

Fiddle Demo

Use afterShow instead of afterLoad

$(document).ready(function () {
    $("#single_1").fancybox({
        helpers: {
            title: {
                type: 'float'
            }
        },
        afterShow: function () { //change here 
            $('.fancybox-image').loupe(); //apply loupe after popup has been shown
        }
    });
});

and use css

as you open fancybox popup it's z-index is 8010 which doesn't allow loupe to show up just give it higher z-index:8020; to make it work .

.loupe {
    z-index:8020;
}
Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107