Browse files

changed size() to length()

  • Loading branch information...
1 parent 98a533e commit 11b0f858b42312401e940216adb7330f15be72e9 @impressivewebs committed Jan 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/script.js
View
4 js/script.js
@@ -17,13 +17,13 @@ $(function(){
// If it wasn't a number, it will return 'NaN'; if so, use the number of list items instead
if (isNaN(currCount)) {
- currCount = $(this).children().size();
+ currCount = $(this).children().length();
}
// do this if the start attribute is not present
// the first number is derived from the number of list items
} else {
- currCount = $(this).children().size();
+ currCount = $(this).children().length();
}
// grab all the child list items

2 comments on commit 11b0f85

@mathiasbynens

As I mentioned in #2, length is a property, not a function.

So it should be $(this).children().length instead of $(this).children().length().

@impressivewebs

Fixed.

Please sign in to comment.