This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Creates an edit box to replace any element, along with a callback | |
function to handle the return value. Call this in real time, not | |
on page load: for example, call it from the onclick of a link or | |
dbclick of a paragraph: | |
$('#editable-thing').bind('click', function(){ | |
$(this).edit_in_place(function(editable_thing, value){alert("You typed "+value)}); | |
}); | |
How it works: |
NewerOlder