【发布时间】:2015-04-21 05:07:45
【问题描述】:
您好,当我返回图像时,我的图像正在重新加载,并且 jssor 滑块看起来闪烁……我还想在缩略图单击时添加淡入淡出效果。有什么解决办法吗???谢谢你的帮助。 我的jquery代码如下:
$(document).ready(function () {
//$('#slider1_container').css('background',url(SITE_URL+'ui/admin/images/loading.gif'));
$(window).unbind("mousewheel");
var _SlideshowTransitions = [
//Fade
{ $Duration: 1200, $Opacity: 2 }
];
var options = {
// $AutoPlay: true,
$Duration: 1200, $Opacity: 2, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
$ThumbnailNavigatorOptions: {
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
// $ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
$Loop: 0,
$ActionMode: 1, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
$Rows: 2, //[Optional] Specify lanes to arrange thumbnails, default value is 1
$SpacingX: 3, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
$SpacingY: 4, //[Optional] Vertical space between each thumbnail in pixel, default value is 0
$Cols: 6, //[Optional] Number of pieces to display, default value is 1
$Align: 156, //[Optional] The offset position to park thumbnail
$Orientation: 2, //[Optional] The offset position to park thumbnail,
$ArrowNavigatorOptions: {
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
$ChanceToShow: 2 //[Required] 0 Never, 1 Mouse Over, 2 Always
}
},
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
$Class: $JssorSlideshowRunner$,
//[Required] Class to create instance of slideshow
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
}
};
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
//responsive code begin
//you can remove responsive code if you don't want the slider scales while window resizes
// ScaleSlider();
// $(window).bind("load", ScaleSlider);
// $(window).bind("resize", ScaleSlider);
// $(window).bind("orientationchange", ScaleSlider);
//responsive code end
});
</script>
网址:http://www.jssor.com/demos/image-gallery-with-vertical-thumbnail.html
【问题讨论】: