Issue 1010 fix

This invokes `el.val()` two times. How about instead saving it to a variable, transforming it to an Array if it already isn't, and doing `$.each(values, function(i, v) { ... })` on that unconditionally? The code would be cleaner.