diff --git a/select2-latest.html b/select2-latest.html index 623a37f9..41536643 100755 --- a/select2-latest.html +++ b/select2-latest.html @@ -1184,16 +1184,17 @@ $("#tags").select2({ - - - Example:
alert("Selected value is: "+$("#e8").select2("val")); $("#e8").select2("val", {id:"CA", text:"Califoria"});+
val
method invoked on a single-select with an unset value will return ""
, while a val
method invoked on an empty multi-select will return []
alert("Selected value is: "+$("#e8").select2("val")); $("#e8").select2("val", {id:"CA", text:"Califoria"});
Gets or sets the selection. Analogous to val
method, but works with objects instead of ids.
data
method invoked on a single-select with an unset value will return null
, while a data
method invoked on an empty multi-select will return []