add comments for value option
This commit is contained in:
parent
6eb3e7a78e
commit
2e7fec7c48
@ -598,8 +598,20 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
**/
|
||||
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
|
||||
@type mixed
|
||||
@default element's text
|
||||
|
Loading…
x
Reference in New Issue
Block a user