jquery UI Sortable with table and tr width

前端 未结 12 799
不知归路
不知归路 2020-11-28 18:02

I am using jQuery UI sortable to make my table grid sortable. The code seems to work fine but because I am not adding width to tds, when I drag the tr

12条回答
  •  被撕碎了的回忆
    2020-11-28 18:54

    Keith' solution is fine but produced a little havoc in Firefox which did not add up the colspans but cued them. (The old js string type pain in the knee)

    replacing this line:

     cellCount += colspan;
    

    with:

     cellCount += colspan-0;
    

    Fixes the problem. (As js is forced to treat the variables as numbers instead of strings)

提交回复
热议问题