The mouse event inside the iframe element will not fire, so the JQuery user interface did not respond when dragging.
To prevent the iframe from capturing the mouse event, you can add mask divs when running drag.
HTML:
<div id="my-frame-wrapper"> <iframe id="my-frame" src="http://jsfiddle.net/"></iframe> <div id="mask"></div> </div>
CSS
#my-frame-wrapper { width:200px; height:100px; position:relative; } #my-frame { width:100%; height:100%; } #mask { position:absolute; top:0; left:0; margin:0; padding:0; width:100%; height:100%; display:none; }
JS:
$(function(){ $("#my-frame-wrapper").resizable({ start: function(event, ui) { $("#mask").css("display","block"); }, stop: function(event, ui) { $("#mask").css("display","none"); } }); });
See jsfiddle .
source share