I have a jQuery dialog that sometimes won't stop resizing when you release the mouse. If it does this, you have to click again on the edge of the div to stop the resize or it will follow your mouse around the screen. I have looked up on stackoverflow this solution to bind an event handler to the resizestop event and added it to my dialog code, but this isn't even firing until you click again, in the case that it doesn't stop resizing on mouseup.
$("div").bind("resizestop", function(event, ui) { alert('stopped resizing'); }); Dialog code:
function showDialog(div, src) { $(div).html('<IFRAME id="orderframe" name="orderframe" frameBorder=0 width="100%" height="100%" style="overflow-x: hidden; overflow-y: scroll;" src="' + src + '"></IFRAME>'); $(div).dialog({ modal: true, height: 750, width: 1050, minWidth: 561, position: ['top', 20], resizable: true, start: function (event, ui) { activatePortlet(jQuery(this).attr("id")); var o = $(this).data('draggable').options; jQuery("iframe").each(function () { jQuery('<div class="ui-resizable-iframeFix" style="background: #fff;"></div>') .css({ width: this.offsetWidth + "px", height: this.offsetHeight + "px", position: "absolute", opacity: "0.001", zIndex: 1000 }) .css(jQuery(this).offset()) .appendTo("body"); }); }, stop: function (event, ui) { jQuery("div.ui-resizable-iframeFix").each(function () { this.parentNode.removeChild(this); }); //Remove frame helpers } }); $("div").bind("resizestop", function (event, ui) { alert('stopped resizing'); }); return false; }