Run jQuery function onclick

前端 未结 4 531
梦如初夏
梦如初夏 2021-02-08 02:28

so i implemented a bit of jQuery that basically toggles content via a slider that was activated by an tag. now thinking about it id rather have the DIV th

4条回答
  •  渐次进展
    2021-02-08 02:33

    You can bind the mouseenter and mouseleave events and jQuery will emulate those where they are not native.

    $("div.system_box").on('mouseenter', function(){
        //enter
    })
    .on('mouseleave', function(){
        //leave
    });
    

    fiddle

    note: do not use hover as that is deprecated

提交回复
热议问题