Hover over a hidden element to show it

后端 未结 6 1428
臣服心动
臣服心动 2020-12-14 17:19

Is there any way to hover over an element that\'s already hidden. I am trying to mimic what Steam does with their arrow navigation on their home page. You\'ll notice that wh

6条回答
  •  Happy的楠姐
    2020-12-14 17:44

    Use the .fadeTo jQuery method to change the opacity of the element on hover state.

    The jQuery site contains an example but something like this should suffice

    $("element").hover(//On Hover Callback
                       function() {$(this).fadeOut(100);} ,
                       //Off Hover Callback 
                       function() {$(this).fadeIn(500);})
    

    From the jQuery Hover page.

提交回复
热议问题