Hey, this looks like something I will need to use, but I am a little
confused as to how to fit it in with my code.
I'm confused about this piece I think:
$('#link-player-' + n).click(function() {
dlg.dialog("open");
return false;
});
Is this a function to give some element with an id of 'link-player-n'
the ability to open the dlg based on the dynamically created id? So it
would perhaps go something like this:
<a href="#" onClick="link-player-1.click()">Open Dialog 1</a>
<div id="dialog-player-1" title="Dialog 1">Here is the text of Dialog
1</div>
Hopefully I am close... Thanks!
On Aug 18, 5:21 am, moleculezz <[email protected]> wrote:
> Ok, so I finally figured it out.
>
> Solution:
> $(function() {
>
> var options = {
> autoOpen: false,
> show: 'blind',
> hide: 'fold',
> width: 800,
> modal: true
> };
>
> var n = 1;
> $("tbody tr td a.links-players").each(function(i) {
>
> var dlg = $('#dialog-player-' + n).dialog(options);
> $('#link-player-' + n).click(function() {
> dlg.dialog("open");
> return false;
> });
> n++;
> });
>
> });
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---