简体   繁体   中英

jQuery fade hover animation on images breaks links

This is my code http://jsbin.com/iKOpIYu/5/edit

Users cant click the image until the animation is over.

If you make the animation longer you will see the problem.

Your animates on the image are doing nothing because you didnt tell it what to animate. I took those out and saw no difference to the fade in and out on the TEST mask.

$(document).ready(function() {
    $('.boxInner').mouseenter(function(e) {

        $(this).children('a').children('span').fadeOut(2000);       
    }).mouseleave(function(e) {
        $(this).children('a').children('span').fadeIn(2000);
    });
});

Doing this Im able to click the link to google whenever. Even though Im pretty sure I was still able to click it even when they were in

http://jsbin.com/iKOpIYu/7

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