jQuery - how can I find the element with a certain id?

后端 未结 5 1852
故里飘歌
故里飘歌 2020-12-25 11:42

I have a table and each of its td has a unique id that corresponds to some time intervals (0800 til 0830... 083

5条回答
  •  北海茫月
    2020-12-25 11:55

    I don't know if this solves your problem but instead of:

    $("#tbIntervalos").find("td").attr("id", horaInicial);
    

    you can just do:

    $("#tbIntervalos td#" + horaInicial);
    

提交回复
热议问题