Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( '.chapter-content').dataPoints( {
- 'generators': {
- '.bagels': function() {
- var $dataPoint = $( this ),
- $number = $dataPoint.find( '.data-point-number' ),
- $text = $dataPoint.find( '.data-point-text' ),
- number;
- if ( parseInt( $number.text(), 10 ) > 1 ) {
- $text.text( 'bagels' );
- } else {
- $text.text( 'bagel' );
- }
- },
- '.another-selector': function() {
- // do different stuff here to calculate the number and then return it
- return 45;
- }
- }
- } );
Add Comment
Please, Sign In to add comment