我一直在使用此代码将ImageId移动到jCrop
但是_ImageId
变量是通过引用给出的。
如何按值给jCrop_ImageId
变量?
var _ImageId = 0;
$(document).ready(
function(){
$('.page .image').attr("id", function(){
_ImageId = $(this).attr("id");
return $(this).attr("id");
}).Jcrop({
ImageId : _ImageId, // my problem is here , when _ImageId change , all of them will change
onSelect: Page_ImageSelected
});
}