Javascript 提升空间
我开发了一个内置升降镜头的引导转盘。问题是,当鼠标离开图像时,镜头不会消失,直到鼠标也离开镜头。在中,这不会发生(当鼠标离开图像时,镜头就会消失) 这是我的密码:Javascript 提升空间,javascript,jquery,html,angularjs,twitter-bootstrap,Javascript,Jquery,Html,Angularjs,Twitter Bootstrap,我开发了一个内置升降镜头的引导转盘。问题是,当鼠标离开图像时,镜头不会消失,直到鼠标也离开镜头。在中,这不会发生(当鼠标离开图像时,镜头就会消失) 这是我的密码: <div id="planos" class="carousel slide" style="border-top:1px solid #FCF3E8; top:-1px" data-interval="false"> <!-- Wrapper for slides --> <div cl
<div id="planos" class="carousel slide" style="border-top:1px solid #FCF3E8; top:-1px" data-interval="false">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox" ng-app="planos-module" ng-controller="planos-controller">
<div ng-repeat="i in getNumber(number) track by $index" class="item" id="plano{{$index+1}}">
<img ng-src="img/planos/{{$index+1}}.jpg" alt="Plano {{$index+1}}" data-zoom-image="img/planos/{{$index+1}}.jpg" />
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control carousel-control-2" href="#planos" role="button" data-slide="prev">
<span class="fa fa-angle-left fa-3x" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control carousel-control-2" href="#planos" role="button" data-slide="next">
<span class="fa fa-angle-right fa-3x" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
我做错了什么
多谢各位
编辑:。我无法将其完全复制为我的web,但同样的问题正在发生。此外,我无法导入ElevateToom js文件,所以我只是将其内容复制粘贴到js FIDLE中(如果您在js部分向下滚动,您可以看到我的代码)
EDIT2:解决了!答案如下。已解决
如果其他人遇到同样的问题,答案如下
我只需要将containLensZoom:true
选项添加到我的ElevateToom初始化中
$(document).ready(function(){
//some code
$('#plano1').addClass('active');
$('#planos .item img').each(function(){
$(this).elevateZoom({
zoomType : "lens",
lensShape : "round",
lensSize : 350,
containLensZoom : true
});
});
//some more code
});
你能创建一个JSFiddle@Vishnu编辑。看看,如果你能帮我一把,我会非常感激的
$(document).ready(function(){
//some code
$('#plano1').addClass('active');
$('#planos .item img').each(function(){
$(this).elevateZoom({
zoomType : "lens",
lensShape : "round",
lensSize : 350,
containLensZoom : true
});
});
//some more code
});