You are on page 1of 2

relative frequency means- proportion histogram vs bar chart- bar chart x axis are different entities and there

can be gaps between bars ( function( $ ) { $.fn.scrollLoad = function( options ) { var defaults = { url : '', data : '', ScrollAfterHeight : 90, onload : function( data, itsMe ) { alert( data ); }, start : function( itsMe ){}, continueWhile : function() { return true; }, getData : function( itsMe ) { return ''; } }; for( var eachProperty in defaults ) { if( options[ eachProperty ] ) { defaults[ eachProperty ] = options[ eachProperty ]; } } return this.each( function() { this.scrolling = false; this.scrollPrev = this.onscroll ? this.onscroll : null; $( this ).bind( 'scroll', function ( e ) { if( this.scrollPrev ) { this.scrollPrev(); } if( this.scrolling ) return; //var totalPixels = $( this ).attr( 'scrollHeigh t' ) - $( this ).attr( 'clientHeight' ); if( Math.round( $( this ).attr( 'scrollTop' ) / ( $( this ).attr( 'scrollHeight' ) - $( this ).attr( 'clientHeight' ) ) * 100 ) > defaults.ScrollAfterHeight ) { defaults.start.call( this, this ); this.scrolling = true; $this = $( this ); $.ajax( { url : defaults.url, data : def aults.getData.call( this, this ), type : 'get', success : function( data ) { $this[ 0 ].scrolling = false; defaults.onload.call( $this[ 0 ] , data, $this[ 0 ] ); if( !defaults.continueWhile.call ( $this[ 0 ], data ) ) { $this.unbind( 'scroll' ) ; } }}); } }); });

} })( jQuery );

You might also like