Latest jQuery and jQuery UI Theme links on Google CDN
JQuery API
.load( url, [ data ], [ complete(responseText, textStatus, XMLHttpRequest) ] )
This method is the simplest way to fetch data from the server. It is roughly equivalent to $.get(url, data, success) except that it is a method rather than global function and it has an implicit callback function.
How to distinguish 2 dialog box since no ID associated?
I can address my dialog text field, because it has a unique ID:
'myDialog1', and from here I traverse upwards to the dialog ("closest
()" searches the ancesters in the DOM tree) and from here downwards to
the title bar ("children()" traverses downwards), e.g.:
$("#myDialog1").closest('.ui-dialog').children('.ui-dialog-
titlebar').hide()
or e.g.:
$("#myDialog1").closest('.ui-dialog').children('.ui-dialog-
buttonpane').css({
top: '80px',
left: '70px',
opacity: .8,
background:"#ffcc99",
border:"8px dashed #f00"
});
D e m o :
http://netzwerkstatt.de/jqui_zweiDialoge
Basic usage of the jQuery UI dialog
All jQuery UI plugins maintain state, such as the current option values, whether the plugin is enabled or disabled, which plugins have been initialized on the element, etc. This state persists from the time the plugin is instantiated on the element until it is destroyed, either explicitly by the user calling .pluginName('destroy') or by removing the element (or one of its ancestors) via .remove(). Because of this state management, you cannot instantiate the same plugin on an element multiple times, unless you destroy the plugin instance first.
No comments:
Post a Comment