Is it possible to hide title when hovering image?

后端 未结 8 905
长情又很酷
长情又很酷 2020-12-21 18:30

This is my code:

\"\"

When I hover that image \"some title\" appears. Is it possib

8条回答
  •  天命终不由人
    2020-12-21 18:51

    Kind of hilarious that on Stack Overflow, five people can give the same answer at the same time :P

    $(function(){
        $('img').hover(function(){
            $(this).removeAttr('title');
        }, function(){
            $(this).attr('title','some title');
        });
    });
    

提交回复
热议问题