简体   繁体   English

jQuery拖放表行和表行组

[英]Jquery drag and drop table rows and groups of table rows

I have records listed on my ruby on rails application in table format. 我在ruby on rails应用程序上以表格格式列出了记录。 The records or table rows are actually grouped into groups of records. 记录或表行实际上被分组为记录组。 I indicate this to the user by having different shaded background colors of the rows. 我通过使行的阴影背景颜色不同来向用户表明这一点。

I need to be able to drag and drop <TR> 's or table rows from one group of rows to another. 我需要能够将<TR>或表行从一组行拖放到另一行。 Ideally, when you're dragging the row and are over another group, it sort of outlines/highlights that group to indicate you're about to drop into that group. 理想情况下,当您将行拖动到另一个组上方时,它会以某种轮廓/突出显示该组,以指示您将要加入该组。

What's the best way to do this? 最好的方法是什么?

I would say highlight the group title when dropping into a group. 我要说的是在加入小组时突出显示小组标题。 Ensure the title of a group is always on the page by using some javascript to make the last group title row that went off the top of the page to always appear (fixed at the top). 通过使用一些JavaScript来确保组标题始终在页面上,使最后离开页面顶部的组标题行始终显示(固定在顶部)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM