У меня есть кнопка внутри каждой строки таблицы, сгенерированной внутри цикла. Кнопка имеет класс click_link
. Идентификатор будет другим для каждой строки. При нажатии кнопки создается диалоговое окно jquery. Мне нужен идентификатор кнопки внутри click()
кнопок диалога, т.е. событие нажатия кнопки "Изменить"
$("#dialog_loader").dialog({resizable: false,
height:"auto",
modal: true,
minWidth: 500,
autoOpen:false,
buttons: {
"Edit": function() {
$.ajax({
url:url1,
type:'POST',
data:data1,
success:function(msg){
if(msg)
{
//alert(msg);
//Here I need to get the id of the button which creates
the dialog.That is id of the button with class **click_link**
}
}
});
},
Cancel: function() {
$( this ).dialog( "close" );
}
}
});
//click event of button
$(document).on('click','.click_link',function(){
$("#dialog_loader").css({'display':'show'});
$('#dialog_loader').dialog('open');
});