Hi,
I am relatively new at jQuery and I have a problem with using Jquery
ui dialog window. I have a asp repeater user control and in every list
item I want to have link, so when the link is clicked, ui dialog is
open.
Here is the repeater control:
<asp:repeater ID="rptDataList" runat="server">
        <HeaderTemplate>
            <ul>
        </HeaderTemplate>


        <ItemTemplate>
            <li>
               <asp:Label runat=”server” Text = “Nekoj”/>

                <div style="display: none" class="dialog"
id=”TombDiv”>
                    <uc:MainControl ControlLinkURL="<%#
((EPiServer.Core.PageData)Container.DataItem).LinkURL %>"
                        runat="server"></uc:MainControl >
                </div>

                <a href="#" class="dialog_link">
                    <asp:Label Text="View more" runat="server" />
                </a>
           </li>
        </ItemTemplate>

        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:repeater>

If I try to attach click function on the a tag like this:

$(document).ready(function() {

    $(".dialog").dialog({ autoOpen: false });
    $(".dialog_link").click(function() {
        $(".dialog").dialog("open");

    });

});

Of course all the modal windows are opening. If i search the div by
ID, none of them is not opening. So I tried something like this:


              $(".dialog_link").click(function() {


                $(this).addClass('selected');
                var myClass = $(this).attr('className');
                $('.dialog).each(
                function(intIndex) {
                   var next = $($(this)[0].nextSibling).attr
('className');
                    if (next == myClass)
                    { $(this).addClass('selectedTombstone'); }

                })
                $('.selectedTombstone').dialog('open');

            })

And  when I debug, ( '.selectedTombstone') gives me the right div, but
after .dialog(‘open’) the modal window is not opening

Please help.
Best regards,
Mimi


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to