You are here

function theme_views_slideshow_breakout_teaser_js in Views Slideshow 6

Same name and namespace in other branches
  1. 5 views_slideshow.module \theme_views_slideshow_breakout_teaser_js()

The mouseover event code for each breakout teaser.

1 theme call to theme_views_slideshow_breakout_teaser_js()
theme_views_slideshow_breakout_teasers in ./views_slideshow.theme.inc
These are teasers that may be pointed at with a mouse to change the element directly.

File

./views_slideshow.theme.inc, line 115

Code

function theme_views_slideshow_breakout_teaser_js($id, $count) {

  // Return the js to set the main div to this teaser's element.
  $hover = module_invoke('jq', 'add', 'hoverIntent') ? 'hoverIntent' : 'hover';
  $js = '
  $("#views_slideshow_div_breakout_teaser_' . $id . '_' . $count . '").' . $hover . '(
    function() {
      views_slideshow_switch("' . $id . '", ' . $count . ');
      views_slideshow_pause("' . $id . '");
    },
    function() {
      views_slideshow_resume("' . $id . '");
   });
';
  return $js;
}