Skip to content

Instantly share code, notes, and snippets.

View ntulip's full-sized avatar

Nick Tulip ntulip

View GitHub Profile
@ntulip
ntulip / jquery.edit_in_place.js
Created July 21, 2009 18:18
edit in place - jquery
/*
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: