开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜