Skip to content
Advertisement

Using jquery code to edit a single list item using the original input box?

I’m finding this code extremely problematic, as it will not edit only a single list item (the item that is clicked), but will instead edit all list items at once to the same input. Any advice is appreciated. Fiddle link below:

https://jsfiddle.net/hufflepuff_hamlet/hy564btq/8/

JavaScript
JavaScript

Advertisement

Answer

You need to use contenteditable global attribute

https://developer.mozilla.org/fr/docs/Web/HTML/Attributs_universels/contenteditable

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement