JQuery UI dialog: how can i get dialog settings? -
If I want to create a JQuery UI dialog, then I do something like this:
< Code> var settings = {autoOpen: incorrect, dragable: wrong, and similar ...}; Var dialog = $ ("# container"). Dialog (settings);
But now I want to know how I can retrieve communication settings as shown above, such as
dialog.getSettings ();
I need this because I have an application that uses many dialogs with a default behavior in some way
function doAfterSubmit (dialogSettings } {// some code} var dialogSettings = {user: {add: {title: "add user", button: {"add": function () {var settings = $ (this) .getSettings (); // Answer goes here // some content doAfterSubmit to send AJAX (settings); }}, Other properties}, remove: {title: "remove user", button: {"remove": function () {var settings = $ (this) .getSettings (); // Answer goes here // some content doAfterSubmit to send AJAX (settings); }}, OtherProperties}, remove all: {title: "remove all users", button: {"remove all": function () {var settings = $ (this) .getSettings (); // Answer goes here // some content doAfterSubmit to send AJAX (settings); After viewing the jQuery UI dialog source, I have visited the property named Default which contains the properties of all the dialog components. But how do I get this default asset? value,
dialog.dialog ('option', ' Name_of_option ');
Should return the dialog option to that.
What you can do to keep the list of names and loops in the array for the rebuilding of settings. Why do you need to return all the options?
Comments
Post a Comment