hide div when mouseout

后端 未结 5 1133
忘掉有多难
忘掉有多难 2021-01-19 08:39

I have two div\'s, one for short summary and one for long summary.
When I \"mouseover\" on the short summary, the short summary disappears and the long summary appears.<

5条回答
  •  感情败类
    2021-01-19 08:56

    Do this way:-

    HTML:

    Short summary
    Second Row

    JQuery:

    $(".main")
        .mouseenter(
            function() {
                $(this+".long").show();
                $(this+".short").hide();
            })
        .mouseleave(
            function() {
                $(this+".short").show();
                $(this+".long").hide();
            });
    

    Refer LIVE DEMO

提交回复
热议问题