getOption

returns the option of a segmented button

object getOption(string|number id);

Parameters

idstring|numberthe ID of an option

Returns

objectthe object with the ID and the value of an option

Example

var option = $$("segmented").getOption("2");
/*
  { "id":"2", "value":"Red" }
*/
 
option.value = "Magenta";
$$("segmented").refresh();

Back to top