FuncUnit.prototype.val  function     

Gets the val from an element or waits until the val is a certain value.

//checks foo's val has "JupiterJS"
ok( /JupiterJS/.test( S('input#foo').val() ) )

//waits until bar's val has JupiterJS
S('input#foo').val(/JupiterJS/)

//waits until bar's val is JupiterJS
S('input#foo').val("JupiterJS")
func_unit.val(val, callback) -> String|funcUnit
{optional:String|Function}

If provided uses this as a check before continuing to the next action.

{optional:Function}

a callback that will run after this action completes.

{String|funcUnit}

if the val parameter is provided, returns the funcUnit selector for chaining, otherwise returns the html of the selector.

© Jupiter IT - JavaScriptMVC Training and Support