Change colour of table cells depending on value

前端 未结 3 1589
走了就别回头了
走了就别回头了 2021-01-26 12:53

I\'m using jQuery to edit the background-color of table cells. My code is as follows (the each cell has numbers in the format \"x/y\" so I mine them out at the star

3条回答
  •  孤独总比滥情好
    2021-01-26 13:33

    Just trigger click event:

    $(document).ready(function() {
        $("#overview td").click(function (event) {
            // ...
        })
        .trigger('click');
    });
    

提交回复
热议问题