Reputation: 1217
I'm trying to bring Kendo UI Modal Window right next to my button and it not working.
Here is my button click code:
$('#button').click(function() {
var x = $("#button").offset().left;
var y = $("#button").offset().top;
window1 = $('#window1');
if (!window1.data("kendoWindow")) {
window1.kendoWindow({
actions: ["Refresh", "Close"],
width: "450px",
position: {
left: x,
top: y
},
title: "Window Title",
modal: true,
resizable: false
});
}
window1.show();
window1.data("kendoWindow").open();
});
Upvotes: 2
Views: 3861
Reputation: 1217
All set.
$("#window1").closest(".k-window").css({
top: y,
left: x
});
Upvotes: 3