2014-09-11 33 views

回答

3

,如果你已经下载了演示有改变onHover选项一个选项的缩略图图像。

只需添加

$ActionMode : 2 

$ThumbnailNavigatorOptions: { 
} 

,它会在缩略图悬停图片上工作。 享受。

2

this源文件,

if (_Options.$ActionMode & 1) $JssorUtils$.$AddEvent(_Wrapper, "click", OnNavigationRequest); 
if (_Options.$ActionMode & 2) $JssorUtils$.$AddEvent(_Wrapper, "mouseover", OnNavigationRequest); 

事件触发基于$ActionMode

SOLUTION:

您需要设置的选项$ActionMode : 2,使其与鼠标悬停事件工作。默认情况下,他们设置$ActionMode : 1

$ThumbnailNavigatorOptions: {}集合$ActionMode : 2。这下面的代码是从list slider

$ThumbnailNavigatorOptions: { 
    $Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance 
    $ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always 

    $Loop: 2, //[Optional] Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1 
    $AutoCenter: 3, //[Optional] Auto center thumbnail items in the thumbnail navigator container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 3 
    $Lanes: 1, //[Optional] Specify lanes to arrange thumbnails, default value is 1 
    $SpacingX: 4, //[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: 4, //[Optional] Number of pieces to display, default value is 1 
    $Align: 0, //[Optional] The offset position to park thumbnail 
    $Orientation: 2, //[Optional] Orientation to arrange thumbnails, 1 horizental, 2 vertical, default value is 1 
    $DisableDrag: false, //[Optional] Disable drag or not, default value is false 
    $ActionMode: 2 
} 

演示文件见最后一行$ActionMode:2$ActionMode在这里扮演着角色。如果您将此设置为1,则会触发click事件。如果您设置了2,则会在mouseover上触发事件。

+1

棒极了@ CJ Ramki – 2014-09-11 14:02:16