I have this javascript code: http://jsfiddle.net/MvWV7/5/
What I'm trying to achieve is that user should fill the inputs starting with 1. After the user types 1 the next value must be 2 (not nanother number) and so on.
I'm trying to fill the inputs values in an array by doing this (as shown in the fiddle):
var ary = [];
$(".activity_order").not(self).each(function(t) {ary.push(this.value);})
but when I do
ary.max()
I get
Uncaught TypeError: Object ,,,,,,,, has no method 'max'
In console when I do ary.max()
i get 0 if there's no numbers
UPDATE
My fault, I was using google console in jsfiddle and I started to look up for array methods inside. When I did ary.max() it gives 0