value | {Any} [optional] | A value to be set. Functions will be evaluted with (previousValue, index) and the return value will be set. |
Value or DollarJS (chainable)
$('p').val()
$('p').val('foo')
$('p').val(function(previousValue, index){ return 'foo'; })
If value is provided, this will set the value for each element and return the current set for chaining
If no arguments are passed, this will return the value of the first element in the current set