I am new to jQuery and I am trying to use editable . I want to use the div tag identifier, since the records are taken from the database, and I need the identifier of each of them so that when I save the information, I can refer to it. How can I wear an identification number? This is my code:
<script language="javascript" type="text/javascript">
$(document).ready(
function()
{
$('div.EditName').editable({
type:'text',
id : 'elementid',
submit:'save',
cancel:'cancel',
onSubmit:SaveName
})
function SaveName(content,elementid)
{
alert(content.current);
alert(elementid);
}
});
HTML code:
<div style="width:80%" class="EditName" id="Name7268">David Price</div>
At this point, I just want to display a warning containing the changed david price and div tag id number.
source
share