I have two slideshows--one is single frame, the other thumbnail hover--on the same page. The most recently added one is single frame, and it causes the thumbnail hover's scripted functionality to break down. Hovering no longer changes the picture in the breakout element nor does it automatically switch by itself.

Any workarounds you could suggest?

#2 namespace-575410-1.patch20.59 KBredndahead
Members fund testing for the Drupal project. Drupal Association Learn more


picardo’s picture

Reviewing the code I realized that the script is not namespaced. This is a serious problem, I think, and it would be very easy to fix it by making the script into a simple jQuery plugin. Thus:

jQuery.fn.views_slideshow = function(num_divs, timer_delay, sort_order, fade, fade_speed, fade_value){

// all the code goes here


...and then you could simply invoke it by:

$('.example').views_slideshow(10, 5000, 1, true, "fast", 0.25);

I was going to just implement a custom solution, but I decided to patch and rewrite the javascript files instead. The javascript of this module needs a little love.

redndahead’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Needs review
20.59 KB

Here is a patch for 2.x. It creates namespaces for each plugin.

redndahead’s picture

Status: Needs review » Fixed

This has been committed

picardo’s picture

That was fast. Congrats.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.