jquery - Jcrop IE8 not work -
i have problem jcrop. funcuina in other browsers not working in ie8. can not find problem. if problem of image data or image size not allow crop. can help??
<script type="text/javascript"> jquery(document).ready(function () { // create variables (in scope) hold api , image size var jcrop_api, boundx, boundy; var $targetimage = jquery('.targetimage'), targetimagedom = $targetimage[0]; var carregarjcrop = function () { $targetimage.jcrop({ onchange: updatepreview, onselect: updatepreview, aspectratio: 1 }, function () { // use api real image size var bounds = this.getbounds(); boundx = bounds[0]; boundy = bounds[1]; // store api in jcrop_api variable jcrop_api = this; }); function updatepreview(c) { if (parseint(c.w) > 0) { var rx = 231 / c.w; var ry = 231 / c.h; jquery('#x').val(c.x); jquery('#y').val(c.y); jquery('#w').val(c.w); jquery('#h').val(c.h); jquery('.jcrop-preview').css({ width: math.round(rx * boundx) + 'px', height: math.round(ry * boundy) + 'px', marginleft: '-' + math.round(rx * c.x) + 'px', margintop: '-' + math.round(ry * c.y) + 'px' }); } }; }; var checacarregamento = function () { if (targetimagedom.complete) { carregarjcrop() } else { settimeout(checacarregamento, 500); } }; if ($targetimage.length > 0) settimeout(checacarregamento, 500); });
are using latest version? seems there ie8 fix:
Comments
Post a Comment