WordPress.org

Forums

Slideshow
[resolved] Description fade instead of slide? (6 posts)

  1. Oslaf
    Member
    Posted 1 year ago #

    Would it be possible to have the choice of making the slide caption/description appear by fading in instead of sliding in from below?
    If not, where should I begin to look into editing the code myself to achieve this?

    http://wordpress.org/plugins/slideshow-jquery-image-gallery/

  2. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    I'm sorry, fading the description inestad of sliding it probably can't be done. The descriptions are in the same element as the slide, so they move along as it starts to animate.

  3. Oslaf
    Member
    Posted 1 year ago #

    Well, I was actually refering to the div containing the description sliding on mouseover -not on slide change- (It shows up labeled with slideshow_description and slideshow_transparent classes in the markup).
    I was intending to use your plugin on a site in which I've already implemented some fading overlays on a grid of masonry formatted items, and I would like to use a similar style for the slideshow -which I would use for the header- to keep it consistent.

  4. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    Alright, that's much easier to do.

    If you go to the slideshow's settings, set the "Hide description box, pop up when mouse hovers over" setting to "No". This will prevent the buttons from being animated by the slideshow, but the slideshow will give them the correct height and positioning.

    You can then simply add the below code to your theme (instead of having to adapt the slideshow's script, which needs to be downloaded from Github and compiled before it works).

    jQuery(document).ready(function()
    {
    	$slideshowSlides = jQuery('.slideshow_container .slideshow_slide');
    
    	$slideshowSlides.find('.slideshow_description').hide();
    
    	$slideshowSlides.on('mouseenter', function(event) { jQuery(event.currentTarget).find('.slideshow_description').stop(true, true).fadeIn(); });
    	$slideshowSlides.on('mouseleave', function(event) { jQuery(event.currentTarget).find('.slideshow_description').stop(true, true).fadeOut(); });
    });
  5. Oslaf
    Member
    Posted 1 year ago #

    Aw, thanks, that'll do it.
    Thanks again for the quick replies; do consider adding the caption slide/fade choice as a feature for this already awesome plugin in the future (maybe some people would like to add different effects to different slideshows).

  6. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    No problem. It would indeed be a good feature for a future release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Slideshow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic