I have a table and rows that are being created dynamically into that table as seen below: How do I add an id just for the at the beginning? I have tried Answer You can add id like this or like this (as in @Lain’s comment)
Tag: attr
Set attribute without value
How do I set a data attribute without adding a value in jQuery? I want this: I tried: Everything else seems to add the second arguments as a string. Is it possible to just set an attribute without value? Answer The attr() function is also a setter function. You can just pass it an empty string. An empty string will