#8316 closed enhancement (wontfix)
dialog() docs; needs a 'dynamic' example.
Reported by: | Thomas W | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.dialog | Version: | 1.8.20 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Existing docs on http://jqueryui.com/demos/dialog/ gives only examples of calling dialog on $(foo) or $('#dialog').
An example would be extremely useful, of how to create a dialog dynamically -- as most dialogs want to be triggered from JS with *dynamic* message, not content already existing in some static <div>.
Existing docs:
A call to $(foo).dialog()
Additional example: Dynamic dialog can be created, at runtime:
$('<div/>').html( yourMessage).dialog();
Thanks.
Change History (7)
comment:1 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Give me an example in the docs or demonstration, which runs from JS code, and doesn't depend on existing DIVs. The documentation page has 4 examples + a demo.. just one in a 'dynamic' form, would show people.
Ever heard of window.alert()? That's what most people want to do with a dialog. The existing docs don't reflect 90% of people's practical usecases -- almost all dialogs are dynamic.
I'd like to help you, and other users, out. Kindly don't just close the issue when legitimate usecases & actual practical/business usage aren't correct in the supposedly technically-perfect system. Again -- I'm trying to help people out here.
Thank you.
comment:3 Changed 10 years ago by
Dialogs are almost always dynamic.
Please provide an example, to reflect this (the most common) usecase.
Thankyou.
comment:5 Changed 10 years ago by
Hi Scott, is there someone who focuses more on "documentation", or an Open-Source way for me to contribute to this myself?
I just want to help people, by providing a single doc/example of the most-common use case. ie. Calling it from JS, like 'window.alert()'.
I can't feel doc is complete, or correct, without *one* example callable from code.
Let me know.
Regards, Tom
comment:6 Changed 10 years ago by
There are multiple reasons to dynamically create dialogs, replacing alerts is only one of them. What you're asking for is much more of a tutorial than API documentation. Feel free to talk to Adam Sontag about writing a tutorial for the upcoming Learn site.
Sorry, but we can't document every use. This has nothing to do with jQuery UI and has everything to do with the most basic usage of jQuery.