Hello,
I want to open MVC view as a dialog.
I am using following code inside webgrid.
theGrid.Column("ReSubmit", format: (item) => Html.ActionLink("ReSubmit Package", "ReSubmitPackage", new { id = item.Jobid },
new { @class = "dialog" }))
$(function () {
$('a.dialog').click(function () {
var url = $(this).attr('href');
var dialog = $('<div style="display:none"></div>').appendTo('body');
debugger;
dialog.load(url, {},
function (responseText, textStatus, XMLHttpRequest) {
dialog.dialog({
close: function (event, ui) {
dialog.remove();
}
});
});
return false;
});
});
But when i click on link i got error in console that,
Uncaught TypeError: dialog.dialog is not a function
my jquery version is 2.1.0 and jquery ui is 1.11.4.
Can any one plz help on this.