I'm stuck with a problem when using Jquery UI Dialog. I generate a table from php (while loop), with headers like name,email,comments. Comments are set to display:none, and i want to show them,only when i click a button like "View" within the corresponding row. The problem is that jquery will generate multiple dialogs , instead of one.
so, my jquery code looks like (from example):
$.fx.speeds._default = 1000;
$(function() {
$( ".dialog" ).dialog({
autoOpen: false,
show: "blind",
hide: "explode"
});
$( ".opener" ).click(function() {
$(".dialog").dialog( "open" );
return false;
});
});
! Where .dialog is the class i set to to my comments, and opener is the class i set to my button view.
What should i do to receive only one dialog, corresponding to the clicked row ? If i click view from row 2, i want dialog with comments corresponding to dialog 2. Not all of them. Thanks in advance!