아래 jquery 스크립트를 사용하여 일부 CSS 정보를 쿠키에 저장하려고합니다. 난 당신이 실제로 선언하기 전에 기능 savePos
및 savePot
을 사용하려는jquery IE 오류 4618
jQuery(document).ready(function() {
// cookie period
var days = 365;
// load positions and z-index from cookies
$("div[id*='tqitem']").each(function(index){
$(this).css("left",
$.cookie("im_" + $(this).attr("id") + "_left"));
$(this).css("top",
$.cookie("im_" + this.id + "_top"));
$(this).css("zIndex",
$.cookie("tqz_" + this.id + "_zIndex"));
});
// bind event
$(".pagenumbers").draggable({cursor: "move"});
$("div[id*='tqitem']").bind('dragstop', savePos);
$("div[id*='tqitem']").bind('dragstop', savePot);
// save positions into cookies
function savePos(event, ui){
$.cookie("im_" + $(this).attr("id") + "_left",
$(this).css("left"), { path: '/', expires: days });
$.cookie("im_" + this.id + "_top",
$(this).css("top"), { path: '/', expires: days });
$.cookie("im_" + this.id + "_zIndex",
$(this).css("zIndex"), { path: '/', expires: days });
};
var thiss = $("div[id*='tqitem']");
function savePot(){
$("div[id*='tqitem']").each(function (i) {
$.cookie("tqz_" + $(this).attr("id") + "_zIndex",
$(this).css("zIndex"), { path: '/', expires: days });
})
};
});
/*ADDITIONAL INFO:
SCRIPT HIERARCHY
Jquery itself
Jquery ui
Jquery cookie plugin
Save cookies js
no matter how i ordered them the result did not change*/
난 그냥 그것을 자신을 해결하고 해결로 답장을 돌아 왔지만 그래 그 문제이고, 덕분에 ...이를 사용했다. 이드는로드하는 동안 저장 및 attr.id 동안 –