简体   繁体   中英

How to Fade Captions in Supersized! Slider

Hi Guys: Would you please tell me why the following code does not animate (fade-in and out) the slide captions in Supersized? plugin. I am substituting the original code with the animated code as follows.

Original code:

if ($(vars.slide_caption).length)
{
   (api.getField('title'))?$(vars.slide_caption).html(api.getField('title')):$(vars.slide_caption).html('');
}

Changed it to:

    if ($(vars.slide_caption).length){
  (api.getField('title')) ? 
  $(vars.slide_caption).fadeOut("slow", function(){
    $(this).html(api.getField("title")).fadeIn("slow")
  }) :
  $(vars.slide_caption).fadeOut().html('');
}

Thanks, but it already works. It was my mistake. I was including supersized.shutter.min.js on the page, but the right file is supersized.shutter.js , wherein I made the change.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM