Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // fire event when window is resized
- $( window ).resize( function() {
- $body = $( 'body' );
- $documentWidth = $( '#document-width' );
- if ($documentWidth.length===0){
- $documentWidth = $( '<p id="document-width" />' );
- $body.prepend( $documentWidth );
- }
- $documentWidth.text( $body.width() );
- } );
Add Comment
Please, Sign In to add comment