Created
January 27, 2012 20:32
-
-
Save jackilyn/1690776 to your computer and use it in GitHub Desktop.
Half & Half
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Half & Half</title> | |
| <style type="text/css"> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| } | |
| #top { | |
| background: #1B242A; | |
| } | |
| #bottom { | |
| background: #0080FF; | |
| } | |
| </style> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| var $window = $(window); | |
| winHeight = $window.height(); | |
| $("#top").height(winHeight/2); | |
| $("#bottom").height(winHeight/2); | |
| $(window).resize(function(){ | |
| winHeight = $window.height(); | |
| $("#top").height(winHeight/2); | |
| $("#bottom").height(winHeight/2); | |
| }); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <div id="top"></div> | |
| <div id="bottom"></div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment