jQuery lightbox with zoom [closed]

隐身守侯 提交于 2019-12-02 20:49:33

Just in case no-one found the solution, here is a way to do it. You will need to use fancybox instead of lightbox and elevatezoom. You can find them at the following links:

http://fancyapps.com/fancybox/#license

http://www.elevateweb.co.uk/image-zoom/download

Once you have downloaded this, add the different plugins in the header (or at the bottom of the body for a faster loading), your header should look like this:

  <link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css" />
  <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script> 
  <script type="text/javascript" src="js/jquery.fancybox.pack.js"></script>
  <script type="text/javascript" src="js/jquery.elevateZoom-3.0.8.min.js"></script>

Just after the jquery.fancybox, add the following:

<style type="text/css">
  .zoomContainer { z-index: 100000; }
</style>

This is a fix so the zoom container appears above the actual fancybox.

Add the class .fancybox on the links wrapping your images.

Then add the following after the different scripts:

    <script type="text/javascript">
     $(document).ready(function() {
      $(".fancybox").fancybox({
       afterShow: function() {
           $('.fancybox-image').elevateZoom({
             zoomType   : "lens",
             lensShape : "round",
             lensSize    : 200
           });
       }
      });
     });
    </script>

You should then have the lense working with fancybox!

Kevin Barton

I'm having the same problem and have only come up with ajax-zoom.com

http://www.ajax-zoom.com/examples/example5.php

It does what we want, but it's rather clunky. I'm using Concrete5 and there's an add-on called jqZoom Image which is a nice simple hover over zoom

http://www.concrete5.org/marketplace/addons/jqzoom-image/

c5extras.com/add-ons/jqzoom

Ideally I would like to embed this into a standard, simple, clean lightbox style pop-up. I've asked the C5 community to see if anyone is up for doing this as I don't have the skills required. If I get anywhere I'll post here.

Did you get anywhere with your quest?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!