我使用kendo Ui和jbox,我可以打开很多次剑道ui窗口,它的工作完美。我在Kendo ui Window上整合了jbox模态窗口。如果我在剑道ui窗口打开jbox模态窗口它太完美了。如果我不关闭kendo ui窗口,我可以多次打开jbox模式窗口,它工作正常。如果我重新打开kendo窗口我可以打开jbox模式,但在jbox javascript内容不能正常工作。我认为它是关于Jquery但我无法解决。 Jquery 1.9.1版本
这是我的代码,
我的索引;
var ICCANPopUp;
$(document).on("click", ".k-overlay", function () {
ICCANPopUp.close();
});
$("#LoadFormDiv").kendoWindow({
width: "750px",
height: "90%",
draggable: false,
resizable: false,
modal: true,
title: "",
visible: false,
open: function(e) {
this.wrapper.css({ top: 25 });
$("html, body").css("overflow", "hidden");
},
close: function (e) {
$("html, body").css("overflow", "");
}
});
$('#LoadFormDiv').closest(".k-window").css({
position: 'fixed',
margin: 'auto',
top: '20%'
});
var ICCANPOPUPLOCATIONBEFOREOPEN;
function ICCANPopUpShow() {
ICCANPopUp = $("#LoadFormDiv").data("kendoWindow");
ICCANPopUp.content('<div style="margin-left:40%; margin-top:20%; ">Yükleniyor...<br/><img src="/Content/images/iccan-loader.gif" width="54" height="55" alt="iMarket Ürün Yükleniyor..." /></div>');
ICCANPopUp.title("");
ICCANPopUp.refresh({
url: "/IccanApi/GetProductByID",
data: { ID: 3012 }
});
ICCANPOPUPLOCATIONBEFOREOPEN = $(window).scrollTop();
window.scrollTo(0,0);
ICCANPopUp.center().open();
}
$("#LoadFormDiv").data("kendoWindow")
.bind("close", function (e) {
$("html, body").animate({ scrollTop: ICCANPOPUPLOCATIONBEFOREOPEN });
});
kendo ui window script&#39> s
$('#FavouriteWrp').jBox('Modal', {
width: 602,
height: 495,
closeButton: true,
ajax: {
url: '/Account/Login',
data: '',
reload: true
},
onClose: function () { ResetAllLoginStuff(); }
});
Jbox模态窗口Conent脚本,(如果我关闭并重新打开kendo窗口,之后如果我打开jbox模式窗口,则此代码不起作用)
$("form").submit(function (e) {
$(".ICCAN-Register-processing").css({ "display": "block" });
var emailForRegister = $("#UserName").val();
var passwordForRegister = $("#Password").val();
var passwordValidateForRegister = $("#PasswordValidate").val();
var smsForRegister = $('#Sms').prop('checked');
var mailingForRegister = $('#Mailing').prop('checked');
var agreementForRegister = $('#agreement').prop('checked');
$.ajax({
url: '/Account/Register',
data: JSON.stringify({
UserName: emailForRegister,
Password: passwordForRegister,
PasswordValidate: passwordValidateForRegister,
Sms: smsForRegister,
Mailing: mailingForRegister,
agreement: agreementForRegister
}),
type: 'POST',
contentType: 'application/json; charset=utf-8',
success: function (response) {
if (response.isSuccess) {
alert("Kayıt Başarılı");
$(".ICCAN-Register-processing").css({ "display": "none" });
window.location.replace("/");
}
if (!response.isSuccess) {
$(".ICCAN-Register-processing").css({ "display": "none" });
$("#UserName").css({ "border": "1px solid red" });
$("#ResultText").show();
}
}
});
e.preventDefault();
e.unbind();
});
$("#ResultText").hide();
可以有人帮助我,非常感谢
答案 0 :(得分:0)
当我刷新页面时,我看到了冲突jquery版本,我是否使用了最新版本的jquery,问题就消失了。