Zoom an image in popup in side a delegate function?

时间:2016-10-20 13:05:12

标签: javascript jquery html fancybox image-zoom

When I click a image the same image will be triggered in fancy box in that popup zoom-in and zoom-out will be there. When zoom-in is clicked the image has to be zoomed in and zoomed out for zoom-out button click.

The code used is

//Main-image-part is the id for image div

$("body").delegate( "#zoom-in","click",function()  {
                    $('#main-image-part').width($('#main-image-part').width()*1.2)
                    $('#main-image-part').height($('#main-image-part').height()*1.2) });


$("body").delegate( "#zoom-out","click",function()  {
                    $('#main-image-part').width($('#main-image-part').width()/1.2)
                    $('#main-image-part').height($('#main-image-part').height()/1.2) });

When I click zoom-in and zoom-out it doesn't work in the popup but in normal page it works fine can any one help me?

0 个答案:

没有答案
相关问题