1
mvc 3 응용 프로그램의 목록 동작에서 삭제 링크의 모달 확인 대화 상자를 표시하려고합니다.jquery UI 대화 상자가 단추와 함께 작동하지 않습니다.
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$("#dialog-confirm").dialog({
autoOpen: false,
modal: true,
resizable: false,
height: 180
});
});
$(document).delegate(".deleteLink", "click", function (e) {
e.preventDefault();
alert('test');
var $link = $(this);
var $dialog = $('#dialog-confirm')
.dialog({
autoOpen: false,
modal: true,
resizable: false,
height: 180,
buttons: {
'button text': function() {
alert("button"); //this is the button, do something with it :)
}
}
});
$dialog.dialog('open');
});
<div id="dialog-confirm" title="Delete the item?" >
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>This item will be deleted. Are you sure?</p>
그리고 난 작동 버튼 옵션을 제거하지만 난 그것을 추가 할 때, 그것은 표시하지 않는 경우이 링크
@Html.ActionLink("حذف", "Delete", "Need", new { id = item.NeedID }, new { @class = "deleteLink", title = "حذف" })
입니다 더 이상 내가 잘못하고있는거야?
처음에 나는 .live 옵션을 사용하지만, 내가 같은 작업을 시도하고, 같은 –
안녕이었다. 그게 너를 위해 일 했니? 제발 좀 도와주세요. – user1282609