It would be helpful if Field Slideshow triggered a custom JavaScript event when the slide changes so that other modules can react as needed.

field_slideshow.js already registers a callback function to cycle's "before" transition event, so it should be a matter of creating a custom event and triggering it on a shared element, like the document itself.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arithmetric’s picture

Status: Active » Needs review
FileSize
897 bytes

Attached is a patch that triggers the custom event "beforeTransition.fieldSlideshow" on the document object before the slide changes.

Other JS code can react to this event by implementing:

jQuery(document).bind('beforeTransition.fieldSlideshow', function (e) { ... });