Thursday, 22 August 2013

How to make list element editable

How to make list element editable

I'm trying to find the best way to make a list element editable when it is
double clicked. If I have something set up like this:
http://jsfiddle.net/sjfqX/3/
HTML
<ul>
<li>Hello</li>
<li>World</li>
</ul>
JS
$('li').dblclick(function() {
//something here?
});
what would be the best way of coding a double click action to let me
change the value of the list element clicked?

No comments:

Post a Comment