isocra / TableDnD

jQuery plug-in to drag and drop rows in HTML tables
http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
Other
401 stars 369 forks source link

Force text in sub elements to be movable #38

Open cretace opened 10 years ago

cretace commented 10 years ago

Is there any way to allow addtional text in a 'td' to be styled AND movable I have a sub title separated with p tag - but when I click and move over that, the text is selected and no moving happens. All I'm trying to do is restyle part of the text within the tr td p structure.

Theres comments on SO (re other plugins) to do: ev.originalEvent.preventDefault(); but no dice ...

iamamitnegi commented 9 years ago

Here is the solution below

we have to allow universal HTML tag elements as blow: Before : jQuery(rows[i]).mousedown(function (ev) { if (ev.target.tagName == "TD")

After: jQuery(rows[i]).mousedown(function (ev) { if (ev.target.tagName)

Please let me know if you have any issue