jquery-ui-dialog

putting a jQuery UI Accordion in a jQuery UI Dialog

跟風遠走 提交于 2019-12-19 02:51:17
问题 By creating the appropriate markup for Tabs, I've been able to place a jQuery UI Tabs widget inside a jQuery UI Dialog; but doing the same with an Accordion has not worked: clicking on the anchor of the accordion section causes the Dialog to close. Is there a straightforward way to accomplish this? 回答1: Works fine for me... I posted a demo for you. Maybe you needed to use the "open" option in the dialog function? $(function() { $("#dialog-modal").dialog({ height: 400, width: 400, modal: true,

putting a jQuery UI Accordion in a jQuery UI Dialog

假如想象 提交于 2019-12-19 02:50:03
问题 By creating the appropriate markup for Tabs, I've been able to place a jQuery UI Tabs widget inside a jQuery UI Dialog; but doing the same with an Accordion has not worked: clicking on the anchor of the accordion section causes the Dialog to close. Is there a straightforward way to accomplish this? 回答1: Works fine for me... I posted a demo for you. Maybe you needed to use the "open" option in the dialog function? $(function() { $("#dialog-modal").dialog({ height: 400, width: 400, modal: true,

ASP.NET with jQuery popup dialog: how to post back on dialog closing

亡梦爱人 提交于 2019-12-18 17:14:48
问题 Folks, I'm working on a rather complicated site. We have an update panel that contains some controls. When one of the controls is clicked, a jQuery dialog box opens. When the dialog box closes, I want to signal the update panel to change its display. To do that I need to post back to the update panel. I know the dialog box has a handy callback event that you can hook up to. But here's the thing. The javascript that manipulates the dialog is all in a separate .js file. I want to continue

jQuery Ui Dialog Buttons, How to add class?

大憨熊 提交于 2019-12-18 11:40:23
问题 I found this answer on another thread.. How to add multiple buttons in Jquery UI dialog box? Using this syntax, how do you add class to a particular button? $("#mydialog").dialog({ buttons: { 'Confirm': function() { //do something $(this).dialog('close'); }, 'Cancel': function() { $(this).dialog('close'); } } }); 回答1: It doesn't look like there's a great way to do this via the API, however you could add the classes in an event handler for create: $("#dialog").dialog({ buttons: { 'Confirm':

jquery ui dialog fixed positioning

为君一笑 提交于 2019-12-18 10:56:07
问题 I needed the dialog to maintain its position fixed even if the page scrolled, so i used the extension at http://forum.jquery.com/topic/dialog-position-fixed-12-1-2010 but there's 2 problems with it: it flickers in IE and Firefox on page scroll (in Safari/Chrome it's fine) on closing and then reopening, it looses its stickyness and scrolls along with the page. Here's the code i'm using for creating the dialog: $('<div id="'+divpm_id+'"><div id="inner_'+divpm_id+'"></div><textarea class="msgTxt

Display jquery dialog in parent window

眉间皱痕 提交于 2019-12-18 10:49:39
问题 I have a website, that uses an iframe. The iframe itself is the content of the website. Now in the iframe I would like to use the jQuery Dialog. However when using it, the overlay and dialog is only displayed inside the iframe not on the parent. My parent html has the following html defined for the dialog: <div id="modalHolder"></div> In my iframe I am using the following javascript to create the dialog and to show it. dlg1 = $(window.parent.document.getElementById("modalHolder")); dlg1 =

jqueryui dialog positioning

巧了我就是萌 提交于 2019-12-18 10:34:34
问题 I am using JQuery UI and would like to position my dialog horizontally centered but vertically above center, maybe by a fixed amount of pixels or a relative distance from the top of the page. Is there an easy way to do this? It looks like there are just a couple pre-defined values or I can use an exact position but is there an easy way to accomplish this? $("#dialog-form").dialog({ autoOpen: false, width: 630, position: 'center', modal: true, resizable: false, closeOnEscape: false }); 回答1:

jquery-ui, Use dialog('open') and pass a variable to the DIALOG

拈花ヽ惹草 提交于 2019-12-18 04:29:17
问题 I have the following JS: $('#listeditdialog').dialog('open'); Which opens the following dialog: $('#listeditdialog').dialog({ autoOpen: false, resizable: false, position: ['center',150], width: 450, open: function(event, ui) { $("#listeditdialog").load("/projects/view/tasks/ajax/?listid=" + XXXX); }, close: function(event, ui) { $("#listeditdialog").html('<p id="loading"> </p>'); } }); My Question is when I use the dialog open function in another JS function, how can I pass a listID variable

jQuery: Set modal dialog overlay color

我的梦境 提交于 2019-12-18 03:02:31
问题 I would like to pop a modal dialog using jquery ui where the overlay is completely black. I know that I can set this in the theme, but I do not want all dialogs to have a black overlay. Just one of them. Is there a way to configure a dialog's background (overlay) color on a per-dialog basis? Perhaps when it is created? TIA 回答1: You can use the open and close events of the ui-dialog. $("#your-dialog").dialog( { autoOpen: false, modal: true, open: function() { $('.ui-widget-overlay').addClass(

jquery dialog save cancel button styling

泪湿孤枕 提交于 2019-12-17 22:09:17
问题 I am using jquery ui dialogs in my application. How do I style the "Save" and "Cancel" buttons differently in a jquery dialog? So "Save" is more appealing than the "Cancel". I could use a hyper link for "Cancel", but how do I place that in the same button panel? 回答1: Here is how to add custom classes in jQuery UI Dialog (Version 1.8+): $('#foo').dialog({ 'buttons' : { 'cancel' : { priority: 'secondary', class: 'foo bar baz', click: function() { ... }, }, } }); 回答2: In jQueryUI 1.8.9 using