次のコードを使用して、mvc3 razor アプリケーションでポップを開きたいと考えています。ボタンをクリックしても何も起こりません。エラーコンソールに「 $(#dialog).dialog is not a function 」というエラーが表示されます。私は jquery を初めて使用します。誰かが私がやっている間違いを手伝ってくれますか?
$(function () {
$('#dialog').dialog({
autoOpen: false,
width: 400,
resizable: false,
title: 'hi there',
modal: true,
open: function(event, ui) {
//Load the Edit action which will return
// the partial view _Edit
$(this).load("@Url.Action("Edit")");
},
buttons: {
"Close": function () {
$(this).dialog("close");
}
}
});
$('#Button1').click(function () {
$('#dialog').dialog('open');
});
});