Veterinar,
<!DOCTYPE HTML>
<html>
<head>
<title>dialog demo</title>
<meta charset="utf-8">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function ()
{
$('.open').click(function ()
{
var name = 'test', id = 100, numrow = 17;
$('#ondelete').dialog("option", "title", name);
$('#ondelete').dialog("option", "buttons",
{
"Удалить выбранную запись?": function(e) {
alert(id)
// в функцию передать ID???
isdel = true;
$(this).dialog("close");
},
"Cancel": function(e) {alert(id);
isdel = false;
// $('#tr'+id).css('background-color','#FFFFFF'); // сюда передать id
$(this).dialog("close");
}
}
);
$('#ondelete').on( 'dialogclose', function(event, ui){
alert(numrow)
//$('#tr'+numrow).css('background-color','#ffffff'); // выполняется сразу! а надо после закрытия мод.окна
});
$('#ondelete').dialog('open');
}
);
$("#ondelete").dialog(
{
autoOpen: false,
resizable: false,
modal: true
}
);
}
);
</script>
</head>
<body>
<div id="ondelete" title="Basic dialog" class="image">
</div>
<button id="opener" class="open" data-image='#dialog'>Open Dialog</button>
</body>
</html>