Change type of jQuery Jeditable after initialization

432 Views Asked by At

I have a Jeditable element, which starts out as a text-editable element. However, based on user choice, I would like to change this to a select type. Is this possible?

If the editable element is a table cell (td), and the answer is to replace that cell with a new element and new Jeditable, how does one do that in jQuery? The replaceWith function gives the error Cannot read property 'parentNode' of null when I try to replace the cell with a new cell.

1

There are 1 best solutions below

2
On

how about making the two types, then just show/hide for which is needed.

for example, make the text-editable and select type but select type is hidden. when user choose select type, you hide text-editable and show select type.