There are many in edit in place JavaScript plugins on the web but this one is perfect.
Damn straight I'm editable. Click me.
$("p.click_to_edit").pie({
// Class to apply to the inplace input.
class: 'editing',
// Attribute used to name the inplace input.
name: 'id',
// Event that triggers the inplace input.
event: 'click',
// Function that returns the element to be edited.
edit: function(x) {
return x;
},
// Function to be called when inplace input is submitted.
submit: function(x) {
alert("Name: "+x.name+" Value: "+x.value);
}
});
<p class="editable" id="pie">Damn straight I'm editable.</p>
There are many in edit in place JavaScript plugins on the web but this one is perfect.
Hover over me please.
$("p.click_to_edit").pie({
// Class to apply to the inplace input.
class: 'editing',
// Attribute used to name the inplace input.
name: 'id',
// Event that triggers the inplace input.
event: 'click',
// Function that returns the element to be edited.
edit: function(x) {
return x;
},
// Function to be called when inplace input is submitted.
submit: function(x) {
alert("Name: "+x.name+" Value: "+x.value);
}
});
<p class="editable" id="pie">Damn straight I'm editable.</p>
There are many in edit in place JavaScript plugins on the web but this one is perfect.
Damn straight I'm editable. Click me.
$("p.click_to_edit").pie({
// Class to apply to the inplace input.
class: 'editing',
// Attribute used to name the inplace input.
name: 'id',
// Event that triggers the inplace input.
event: 'click',
// Function that returns the element to be edited.
edit: function(x) {
return x;
},
// Function to be called when inplace input is submitted.
submit: function(x) {
alert("Name: "+x.name+" Value: "+x.value);
}
});
<p class="editable" id="pie">Damn straight I'm editable.</p>