Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery幻灯片插件:只有一张幻灯片时幻灯片图像不可见_Jquery_Slider_Image Gallery - Fatal编程技术网

jQuery幻灯片插件:只有一张幻灯片时幻灯片图像不可见

jQuery幻灯片插件:只有一张幻灯片时幻灯片图像不可见,jquery,slider,image-gallery,Jquery,Slider,Image Gallery,我和你一起工作 我有一个包含幻灯片显示的多个动态实例的页面: 当滑块中只有一个图像时,该图像不会显示。上面链接处的第一个滑块显示此问题。当存在多个图像时,它们都显示良好: 下面是第一个链接中单个图像的代码 这有什么意义吗?我有错误吗 非常感谢您的建议 <div id="container1"> <div id="slides1"> <div class="slides_container"> <div class="slides_control">

我和你一起工作

我有一个包含幻灯片显示的多个动态实例的页面:

当滑块中只有一个图像时,该图像不会显示。上面链接处的第一个滑块显示此问题。当存在多个图像时,它们都显示良好:

下面是第一个链接中单个图像的代码

这有什么意义吗?我有错误吗

非常感谢您的建议

<div id="container1">
<div id="slides1">
<div class="slides_container">
<div class="slides_control">
<div class="slide" style="">
<a href="images/intermediate/I014N1013.jpg" rel="lightbox" title="Title: Plan of eight lots of ground with the buildings and improvements thereon...">
<img class="content" src="images/covers/C014N1013.jpg" alt="C014N1013.jpg"></a>
<div class="caption" style="bottom: 0px; ">Plan of eight lots of ground with the buildings and improvements thereon... </div>
</div> <!-- slide -->
</div> <!-- slides_control -->
</div> <!-- slides_container -->
<a href="#" class="prev"><img src="js/slides/img/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
<a href="#" class="next"><img src="js/slides/img/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>   
</div> <!-- slides1 -->
<img src="js/slides/img/example-frame.png" width="739" height="341" alt="Frame" id="frame1">
</div>

八块土地的平面图,包括建筑物及其改进。。。
编辑slides.jquery.js

// after the variable setting on and after line 29
var elem = $(this),
control = $('.slides_control',elem),
total = control.children().size(),
... snip ...
playInterval;

这就解决了问题

和平

if (total == 1){        
  $('.'+option.container,elem).css({display:'block'});          
  // disable prev/next imgs
  $('.'+option.prev+' img',elem).css({display:'none'});
  $('.'+option.next+' img',elem).css({display:'none'});
}