简体   繁体   中英

Div not fading out - Chrome bug

This is the website that i'm working: site

My client is having a problem with the fading out of the photo info. I can't replicate the error even using the same browser version (chrome 33.0.1750).

This is the script i'm using to position the info div:

$('.realpeople-img').on('click', function(){
    $(this).next('.realpeople-info').fadeIn();
    setTimeout(function() {
        var offset = $('#fancybox-wrap').offset();
        /* $('.realpeople-info').css('top', offset.top + 30); */
        $('.realpeople-info').css('left', offset.left + 30);
    }, 100);
});

And this is inside the $.fancybox.close = function() { :

 $('.realpeople-info').fadeOut(1);

And this is what is happening to him: (Looks like after he opens and close every image the info stays on the screen without fading out)

在此处输入图片说明

Does someone here has the same problem? any ideas how to solve it?

1并非1秒,该值以毫秒为单位分配,因此您可能尝试应用1秒,对此设置为1000。1000ms = 1s

$('.realpeople-info').fadeOut(1000);

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