When "left" is used, positions[ pos[0] ] evaluates to 0. Since this is false-y, the calculation moves onto parseFloat( pos[0] ) / 100, which evaluates to NaN (since it's trying to do parseFloat("left")). (A similar case occurs with "top".) This leads to a JS error later on.
...s #14)
When
"left"
is used,positions[ pos[0] ]
evaluates to0
. Since this isfalse
-y, the calculation moves ontoparseFloat( pos[0] ) / 100
, which evaluates toNaN
(since it's trying to doparseFloat("left")
). (A similar case occurs with"top"
.) This leads to a JS error later on.