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
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).