diff options
| -rw-r--r-- | index.html | 4 | ||||
| -rw-r--r-- | js/global.js | 15 | 
2 files changed, 18 insertions, 1 deletions
| diff --git a/index.html b/index.html index 767add4bf..25ee9a4da 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,8 @@  		<link rel="stylesheet" href="./css/screen.css" type="text/css" media="screen" />  		<link rel="stylesheet" href="./css/fonts/chunkfive/chunkfive.css" type="text/css" media="screen" /> +		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> +		<script type="text/javascript" src="./js/global.js"></script>  	</head>  	<body> @@ -83,7 +85,7 @@ Created /usr/local/Library/Formula/bar.rb</code></pre>  								<p>Homebrew formula are simple Ruby scripts:</p>  							</div>  							<div class="col-2"> -								<pre><code><span style="color: #8a9597;">require</span> <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">formula</span><span style="color: #c2c98f;">'</span> +								<pre class="overflow"><code><span style="color: #8a9597;">require</span> <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">formula</span><span style="color: #c2c98f;">'</span>  <span style="color: #8a9597;">class</span> <span style="color: #e3d796;"><em>Wget</em></span> < Formula    homepage <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">http://www.gnu.org/wget/</span><span style="color: #c2c98f;">'</span> diff --git a/js/global.js b/js/global.js new file mode 100644 index 000000000..5a5515420 --- /dev/null +++ b/js/global.js @@ -0,0 +1,15 @@ +(function($) { +	$(function() { +		$('pre.overflow').bind('mouseover', function() { +			$(this).css({ +				'overflow' : 'auto', +				'padding-bottom' : '8px' +			}); +		}).bind('mouseout', function() { +			$(this).css({ +				'overflow' : 'hidden', +				'padding-bottom' : '23px' +			}); +		}).trigger('mouseout'); +	}); +})(jQuery); | 
