From 74f9af980c72e5f7b3e65568de5306bedf7b07c8 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Mon, 7 Feb 2011 22:13:27 -0500 Subject: [PATCH] docs : `parseFloat` to sorting docs --- _posts/docs/2010-12-07-sorting.mdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/docs/2010-12-07-sorting.mdown b/_posts/docs/2010-12-07-sorting.mdown index 32e4ba1..3160505 100644 --- a/_posts/docs/2010-12-07-sorting.mdown +++ b/_posts/docs/2010-12-07-sorting.mdown @@ -66,7 +66,7 @@ $('#container').isotope({ {% endhighlight %} -For numerical data, we can convert a text value into a number via `parseInt()` function. +For numerical data, we can convert a text value into a number with `parseInt()` or `parseFloat()`. {% highlight javascript %} @@ -76,7 +76,7 @@ getSortData : { return parseInt( $elem.find('.name').text(), 10 ); }, weight : function ( $elem ) { - return parseInt( $elem.find('.weight').text(), 10 ); + return parseFloat( $elem.find('.weight').text() ); } }