It seems the slideshow pauses when the mouse hovers over the image. I'm wondering if this is due to the image html title popping up? Ideally I'd like the slideshow to keep running regardless of interaction. I'm using the single frame method. Otherwise everything is working very nicely. A very easy and powerful module, thanks.

Comments

tanc’s picture

I've just removed all titles from imgs so nothing pops up when hovering over a slideshow image, but the slideshow still pauses on hover. I guess its a feature or is it something to do with the thumbnail hover mode? It would be useful to switch pause on hover on or off.

tanc’s picture

I discovered the hover effect is implemented in a theme function theme_views_slideshow_div_js. I've overridden the function so as to add a check to see whether the slideshow is in thumbnail hover mode, in which case the hover js is added, otherwise it isn't. This provides the effect I was looking for and I've posted my code to be placed in template.php for anyone else who might find it useful:

function phptemplate_views_slideshow_div_js($view, $nodes, $type, $items, $div) {
	$mode = isset($view->slideshow['mode']) ? $view->slideshow['mode'] : variable_get('views_slideshow_default_mode', VIEWS_SLIDESHOW_DEFAULT_MODE);
  $divs = '"' . implode('", "', array_keys($items)) . '"';
  $num_divs = sizeof($items);
  $timer_delay = isset($view->slideshow['timer_delay']) ? $view->slideshow['timer_delay'] : variable_get('views_slideshow_default_timer_delay', VIEWS_SLIDESHOW_DEFAULT_TIMER_DELAY);
  $sort = isset($view->slideshow['sort_order']) ? $view->slideshow['sort_order'] : variable_get('views_slideshow_default_sort_order', VIEWS_SLIDESHOW_DEFAULT_SORT_ORDER);
  $fade = isset($view->slideshow['fade']) ? $view->slideshow['fade'] : variable_get('views_slideshow_default_fade', VIEWS_SLIDESHOW_DEFAULT_FADE);
  $fade = $fade ? 'true' : 'false';
  $fade_speed = isset($view->slideshow['fade_speed']) ? $view->slideshow['fade_speed'] : variable_get('views_slideshow_default_fade_speed', VIEWS_SLIDESHOW_DEFAULT_FADE_SPEED);
  $fade_value = isset($view->slideshow['fade_value']) ? $view->slideshow['fade_value'] : variable_get('views_slideshow_default_fade_value', VIEWS_SLIDESHOW_DEFAULT_FADE_VALUE);
  $hover = (module_invoke('jq', 'add', 'hoverIntent')) ? 'hoverIntent' : 'hover';
  $js = '
// set the timer data for a view slideshow
$(document).ready(function() {
  // these are the divs containing the elements to be displayed in the main div in rotation or mouseover
  slideshow_data["' . $div . '"] = new views_slideshow_data(' . $num_divs . ', ' . $timer_delay . ', ' . $sort . ', ' . $fade . ', "' . $fade_speed . '", ' . $fade_value . ');

  // this turns on the timer
  views_slideshow_timer("' . $div . '", true);

  // this sets up the mouseover & mouseout to pause on the main element but only for thumbnail hover mode
	';
  if ($mode == VIEWS_SLIDESHOW_MODE_THUMBNAIL_HOVER) {
  $js .= '
	$("#views_slideshow_main_' . $div . '").' . $hover . '(
    function() {
      views_slideshow_pause("' . $div . '");
    },
    function() {
      views_slideshow_resume("' . $div . '");
    });';
	};
	$js .= ' }); ';
  return $js;
}

Thanks again for this awesome module.

scafmac’s picture

haagendazs’s picture

Version: 5.x-1.x-dev » 6.x-1.0-beta1

I've had the same problem using this plugin for Drupal 6 and couldn't get either one of the patches to work.

I fixed this with CSS, using the fact that the slideshow div is inside the view div. In concrete terms: My outer div is called view-home, my slideshow div is called .views_slideshow_main.

I positioned both absolutely and gave the view div a higher z-index and a width & height. Because of that, the inner div (.views_slideshow_main) doesn't register the mouse hover and doesn't pause.

Here's the code:
.view-home{
position: relative;
width: 746px;
height: 445px;
z-index: 1000;
}

.views_slideshow_main,
.views_slideshow_hidden,
.views_slideshow_hidden .views-field-field-image-fid,
.views_slideshow_hidden .views-field-field-image-fid img{
position: relative;
z-index: -100;
}

And here's the example website:
http://lessmeatarian.com/

dragonwize’s picture

Title: Slideshow pauses on hover - how to have continuous? » Option to not pause on hover
Category: support » feature
Status: Active » Closed (duplicate)

Marking as duplicate of #278401: Hover pause too big issue and disable hover pause option since scafmac has included this feature in his patch.

botris’s picture

Working with D6 I found that:
- the code above gives some errors.
- the patch does not work on D6
- the z-index solution has 'issues' with IE, but works in FF
- Post http://drupal.org/node/401860 did it for me!