Make table row clickable

前端 未结 4 679
Happy的楠姐
Happy的楠姐 2021-01-15 19:22

I have a table row that has background color on hover. When user clicks within the background color area, it should grab the link of the anchor tag inside the row and take t

4条回答
  •  青春惊慌失措
    2021-01-15 19:49

    how about:

    $('#ClickableRow').click(function () {
         window.location = $('a:first', this).attr('href');
    });
    

提交回复
热议问题