http://jsfiddle.net/y8Uju/25/
Over there is my fiddle and if you add stuff to the list sometimes and I mean sometimes when you refresh page bottom 1 i开发者_运维技巧tem disappears....why is this?
You reuse the 'i' variable, without declaring in your bindName function. Therefor it skips every even item in the list. Just change
for (i = 0; i < inputNames.length; i++) {
into
for (var i = 0; i < inputNames.length; i++) {
PS. please post your code on StackOverflow, instead of just referring to a jsfiddle.
精彩评论