开发者

Generating new ids for table rows

开发者 https://www.devze.com 2023-02-09 18:04 出处:网络
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(

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消