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

后端 未结 5 1862
故里飘歌
故里飘歌 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 12:02

    This

    var verificaHorario = $("#tbIntervalos").find("#" + horaInicial);
    

    will find you the td that needs to be blocked.

    Actually this will also do:

    var verificaHorario = $("#" + horaInicial);
    

    Testing for the size() of the wrapped set will answer your question regarding the existence of the id.

提交回复
热议问题