Browse Source

docs : `parseFloat` to sorting docs

pull/14/head
David DeSandro 14 years ago
parent
commit
74f9af980c
  1. 4
      _posts/docs/2010-12-07-sorting.mdown

4
_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() );
}
}

Loading…
Cancel
Save