Automatically resize jQuery UI dialog to the width of the content loaded by ajax

I’ve just wrote a tiny sample app using JQuery 1.4.1 and UI 1.8rc1. All I did was specify the constructor as: var theDialog = $(“.mydialog”).dialog({ autoOpen: false, resizable: false, modal: true, width:’auto’ }); I know you said that this makes it take up 100% width of the browser window but it works sweet here, tested … Read more

jQuery UI Dialog – missing close icon

I am late to this one by a while, but I’m going to blow your mind, ready? The reason this is happening, is because you are calling bootstrap in, after you are calling jquery-ui in. Literally, swap the two so that instead of: <script src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js”></script> <script src=”https://stackoverflow.com/questions/17367736/js/bootstrap.min.js”></script> it becomes <script src=”https://stackoverflow.com/questions/17367736/js/bootstrap.min.js”></script> <script src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js”></script> 🙂 Edit … Read more

How can I disable a button on a jQuery UI dialog?

Looks like anyone, even in this linked question, have proposed this solution, similar to the first part of the answer given by Nick Craver: $(“#dialog”).dialog({ width: 480, height: “auto”, buttons: [ { id: “button-cancel”, text: “Cancel”, click: function() { $(this).dialog(“close”); } }, { id: “button-ok”, text: “Ok”, click: function() { $(this).dialog(“close”); } } ] }); … Read more

Correctly calling setGridWidth on a jqGrid inside a jQueryUI Dialog

There are some cases, where jqGrid calculate the width a little incorrect. Mostly I have problems with grid width, but in some cases on IE6 also with the height. So I have to write a small function to fix the problem. var fixGridWidth = function (grid) { var gviewScrollWidth = grid[0].parentNode.parentNode.parentNode.scrollWidth; var mainWidth = jQuery(‘#main’).width(); … Read more