Revision: 56327
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 22, 2012 04:03 by eowynx
Initial Code
$('.edit').editable(submitEdit, { indicator: '<img src="/images/indicator.gif">', id : $(this).attr('tradu'), tooltip: 'editar', cancel: 'cancelar', submit: 'ok', event: 'edit' }); /* Find and trigger "edit" event on correct Jeditable instance. */ $(".edit_trigger").bind("click", function () { $(this).parent().prev().trigger("edit"); }); function submitEdit(value, settings) { var origvalue = this.revert; var textbox = this; var result = value; var edits = 'nuevo='+value+'&anterior='+origvalue+'&id_string='+$(this).attr('tradu')+'&lang=<?=$lang?>'; var returned = $.ajax({ url: "/procedures/saveTranslation.php", type: "POST", data : edits, complete : function (xhr, textStatus) { var response = xhr.responseText; if (response != "") { alert(response); } } }); return(result); }
Initial URL
Initial Description
simple jquery jeditable example
Initial Title
JEDITABLE EXAMPLE
Initial Tags
jquery, Online
Initial Language
jQuery