Jquery Fancybox draggable issue with Scrollbars

前端 未结 4 1477
一整个雨季
一整个雨季 2020-12-21 06:51

I am using a fancybox with plugin jquery.easydrag.js. The reason for this is to be able to drag the fancybox around.

It seems to be working fine, but th

4条回答
  •  一个人的身影
    2020-12-21 07:02

    After testing these solutions I ran into the problem with dragging an iframe. To resolve, I switched to the jQuery 1.9.1 UI plugin for dragging and created a transparent image while dragging. Remove the image after dragging to access the content. Works great with fancybox iframe and enables fast dragging over the iframe. See sample code below.

    $("#iframePop").fancybox({
                 'width': 890,
                 'height': 430,
                 'type': 'iframe',
                 'autoScale': 'false',
                 'hideOnContentClick': false,
                 'onComplete': function() {
                      $("#fancybox-title").css({'top':'-2px', 'left':'15px', 'bottom':'auto', 'cursor':'move'});                       
                      $("#fancybox-wrap" ).draggable({ handle: "fancybox-title", iframeFix: true, 
                            start: function(ev,ui){$("#fancybox-wrap").append("")}, 
                            drag: function(ev,ui){}, 
                            stop: function(ev, ui){$("#fancybox-wrap #hidenDiv").remove()} 
                      });  
                    }
             });
    

提交回复
热议问题