Using fade in/fade out with jquery

后端 未结 4 1691
余生分开走
余生分开走 2021-01-27 05:48

I am working over on of my student projects and I am new jquery, for the project I have to use jquery to enhance few function and I have learned much to carry out basic tasks, b

4条回答
  •  别那么骄傲
    2021-01-27 06:15

    Maven,

    Have you thought of using css webkit? This SO article goes into detail for crossfading images - at different rates. CSS Webkit Transition - Fade out slowly than Fade in

    You can also make use of a basic event to fade-in/fade-out the image. This JQuery/JSFiddle SO article makes use of the this reference object: Jquery fadeOut on hover

    The basic fade-in / fade-out structure from the JSFiddle.net documention is as follows:

    $('#show').hover(function() {
        $(this).stop(true).fadeTo("slow", 0);
    }, function() {
        $(this).stop(true).fadeTo("slow", 1);
    });
    

    ~JOL

提交回复
热议问题