aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Prévost2010-03-13 13:08:54 -0500
committerJack Nagel2011-11-02 19:21:04 -0500
commit7cca8b8cd7d722d1620f2884987425deff4bb609 (patch)
tree4b2fcb08992cb67b282e4fd03424f66ac10d3830
parent0f953357ed8f55c43899c445fa57926807a30c5c (diff)
downloadhomebrew-7cca8b8cd7d722d1620f2884987425deff4bb609.tar.bz2
Add visible overflow on mouseover
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--index.html4
-rw-r--r--js/global.js15
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> &lt; 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);