[英]jQuery imgAreaSelect Hiding with jqModal?
Trying to hide my imgAreaSelect selection area when my jqModal window closes.当我的 jqModal window 关闭时,试图隐藏我的 imgAreaSelect 选择区域。 I had to do some z-index fixing to get this to work inside the jqModal window, but the selection area doesn't disappear and I'm left with a large black overlay.我必须做一些 z-index 修复才能让它在 jqModal window 中工作,但是选择区域并没有消失,我留下了一个大的黑色覆盖层。 Unfortunately calling the imgAreaSelect to hide isn't working for some reason..不幸的是,由于某种原因,调用 imgAreaSelect 隐藏不起作用..
This is my current code:这是我当前的代码:
<script type="text/javascript">
var ias;
$().ready(function() {
ias = $('#prevImage').imgAreaSelect({ aspectRatio: '9:6', instance: true });
$('#cropImg').jqm({modal: true, trigger: '.showCrop'});
});
hideSelect() {
ias.setOptions({ hide: true });
ias.update();
}
</script>
<input type="button" class="showCrop">
<div id="cropImg">
<img border="0" src="IMAGES/preview.png" width="590" id="prevImage" />
<input type="button" onclick="hideSelect();" href="" class="jqmClose" value="Cancel">
</div>
Thanks very much!非常感谢!
ias.cancelSelection()
should work if I understood your question correctly.如果我正确理解您的问题, ias.cancelSelection()
应该可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.