Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
Created March 24, 2009 22:55
Show Gist options
  • Save aviflombaum/84416 to your computer and use it in GitHub Desktop.
Save aviflombaum/84416 to your computer and use it in GitHub Desktop.
function enable_edit_mode(){
$('.is_editable').each(function(){
$(this).bind('click.edit_mode', function(e){
edit_element(this);
return false;
});
});
};
function edit_element(edititable_element) {
... code ...
edited_element = $(edititable_element).clone(true);
$(edititable_element).replaceWith(edit_div);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment