jquery ui dialog inside repeater

jquery , asp.net , csharp Stockholm, Sweden
  • 8 years ago
    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: 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

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If debugging is the process of removing software bugs, then programming must be the process of putting them in.” - Edsger Dijkstra