Is it possible to use jQuery .on and hover?

前端 未结 10 797
失恋的感觉
失恋的感觉 2020-11-22 11:03

I have a

    that is populated with javascript after the initial page load. I\'m currently using .bind with mouseover and
10条回答
  •  难免孤独
    2020-11-22 11:50

    $("#MyTableData").on({
    
     mouseenter: function(){
    
        //stuff to do on mouse enter
        $(this).css({'color':'red'});
    
    },
    mouseleave: function () {
        //stuff to do on mouse leave
        $(this).css({'color':'blue'});
    
    }},'tr');
    

提交回复
热议问题