Switched from `size()` to `length`

`size()` is deprecated: http://api.jquery.com/size/