Hello ,
My Dialog is not working. when i click on button, nothing happens.THis is the code that i am using
function openPop(url, divClass, title, width, height,btnOk) {
var b = [];
if (btnOk) {
b = [
{
text: "OK",
click: function () { jQuery("." + divClass).dialog('destroy'); }
}
];
}
var ifr = jQuery("." + divClass).find('iframe');
jQuery("." + divClass).dialog({
modal: true,
autoOpen: true,
title: title,
width: width,
height: height,
resizable: false,
position: {
my: "center",
at: "center",
of: window,
within: window
},
buttons: b,
open: function () {
setTimeout(function () {
jQuery(ifr).attr('src', url);
}, 10);
},
close: function () {
jQuery(ifr).attr('src', 'about:blank');
jQuery(this).dialog('destroy');
}
});
}
this is how i call this function
$(".btn").click(function () {
openPop('<%= Request.ApplicationPath%>/StoreManagement/AddNew.aspx', 'divPop', 'Add New Store', 650, 550);
return false;
});
whenever i click the button only page blurs for a moment and then returns to it's original state. This code works fine with jquery 1.6.something. now i am trying to use it with jquery 2.1.something but not working here.