Generating new ids for table rows
I have developed an expand/collpase data grid where each TR will expand/collapse the child rows within. Also, it can create new TR's with child rows having the ability to expand/collapse using .live() function.
As of now, id's for the parent TR and child TD and hardcoded. Now i have to generate unique id for parent and child rows using jquery. How ca开发者_开发知识库n i do that..?
Here is the implementation: Demo
This is how expand/collapse works Expand/Collapse logic
Thanks, Ravi.
You can use a global counter, see my update.
精彩评论