[jQuery] jeditable and selects: how does it choose the default?
I have a question about how jeditable chooses which select option to
start with when you click to edit a field. For example I have the
following table:
Person 1, Color: Orange
Person 2, Color: Blue
Person 3, Color: Blue
Person 4, Color: Orange
Person 5, Color: Red
Person 6, Color: Orange
Then clicking on a color produces a dropdown box with the help of
jeditable.
If the select options are blue,orange,red,yellow (in that order). Most
of the time the shown text is preselected when I invoke the jeditable
select (example clicking on "Orange" will have "Orange" selected).
Sometimes though, it defaults to the first item ("Blue").
How does jeditable preselect when you don't use a selected item in the
json data? On my pages it guesses well 19 out of 22 times. I'm just
curious.