add comments for value option
This commit is contained in:
@ -598,8 +598,20 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
|||||||
**/
|
**/
|
||||||
autotext: 'auto',
|
autotext: 'auto',
|
||||||
/**
|
/**
|
||||||
Initial value of input. If not set, taken from element's text.
|
Initial value of input. If not set, taken from element's text.
|
||||||
|
Note, that if element's text is empty - text is automatically generated from value and can be customized (see `autotext` option).
|
||||||
|
For example, to display currency sign:
|
||||||
|
@example
|
||||||
|
<a id="price" data-type="text" data-value="100"></a>
|
||||||
|
<script>
|
||||||
|
$('#price').editable({
|
||||||
|
...
|
||||||
|
display: function(value) {
|
||||||
|
$(this).text(value + '$');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
@property value
|
@property value
|
||||||
@type mixed
|
@type mixed
|
||||||
@default element's text
|
@default element's text
|
||||||
|
Reference in New Issue
Block a user