小编Wil*_*nka的帖子

jCrop API在IE中为null或不是对象,但在FF,Chrome等中有效

我写了一个基于jCrop的extedned插件,一个接一个地裁剪多个图像.

我使用Chrome开发和调试,一切正常,没有任何JavaScript问题.当我在资源管理器中进行测试时,它崩溃并抛出一个写出的脚本错误

jcrop api is null or not an object

所以我的javascript很简单......

var jcrop_api; //Global var to be used thorugh out the client

//some code here

//jCrop documention tells us to use this to assign itself to an object.
//I look for both because i use .net masterpages and sometimes not.

$('#SourceImage, #body_SourceImage').Jcrop({},function () { jcrop_api = this; });


//some more code but not far down the line i need to set jCrop options using API

jcrop_api.setOptions({
           boxWidth: bw,
           onSelect: updateCoords, …
Run Code Online (Sandbox Code Playgroud)

jquery internet-explorer jcrop

3
推荐指数
1
解决办法
1693
查看次数

标签 统计

internet-explorer ×1

jcrop ×1

jquery ×1