making the docs a little less jumpy with more stable menus
This commit is contained in:
parent
aad0ce162d
commit
6985802eb3
|
@ -130,7 +130,8 @@ div.code {
|
|||
.navigation.try {
|
||||
border-left: 0;
|
||||
}
|
||||
.navigation:hover {
|
||||
.navigation:hover,
|
||||
.navigation.active {
|
||||
background: #d0d0d0;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#c0c0c0));
|
||||
background: -moz-linear-gradient(top, #f0f0f0, #c0c0c0);
|
||||
|
@ -147,7 +148,7 @@ div.code {
|
|||
-webkit-border-top-right-radius: 0; -moz-border-radius-topright: 0;
|
||||
-webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
|
||||
}
|
||||
.navigation:hover .contents {
|
||||
.navigation.active .contents {
|
||||
display: block;
|
||||
}
|
||||
.navigation .contents.repl_wrapper {
|
||||
|
|
|
@ -145,7 +145,7 @@ alert reverse '!tpircseeffoC'</textarea>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
To install, first make sure you have a working version of
|
||||
To install, first make sure you have a working version of
|
||||
<a href="http://nodejs.org/">Node.js</a>, 0.1.30 or higher. Then clone the CoffeeScript
|
||||
<a href="http://github.com/jashkenas/coffee-script">source repository</a>
|
||||
from GitHub, or download the latest
|
||||
|
@ -741,7 +741,7 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
|
|||
<span id="change_log" class="bookmark"></span>
|
||||
Change Log
|
||||
</h2>
|
||||
|
||||
|
||||
<p>
|
||||
<b class="header" style="margin-top: 20px;">0.5.0</b>
|
||||
CoffeeScript 0.5.0 is a major release, While there are no language changes,
|
||||
|
@ -911,24 +911,45 @@ coffee --print app/scripts/*.coffee > concatenation.js</pre>
|
|||
<script type="text/javascript" src="lib/nodes.js"></script>
|
||||
<script type="text/javascript" src="lib/coffee-script.js"></script>
|
||||
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.repl_compile = function() {
|
||||
var source = document.getElementById('repl_source').value;
|
||||
var source = $('#repl_source').val();
|
||||
window.compiled_js = '';
|
||||
try {
|
||||
window.compiled_js = CoffeeScript.compile(source, {no_wrap: true});
|
||||
} catch(error) {
|
||||
alert(error);
|
||||
}
|
||||
document.getElementById('repl_results').innerHTML = window.compiled_js;
|
||||
}
|
||||
$('#repl_results').html(window.compiled_js);
|
||||
};
|
||||
window.repl_run = function() {
|
||||
try {
|
||||
eval(window.compiled_js);
|
||||
} catch(error) {
|
||||
alert(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var nav = $('.navigation');
|
||||
var currentNav = null;
|
||||
var closeMenus = function() {
|
||||
if (currentNav) currentNav.removeClass('active');
|
||||
currentNav = null;
|
||||
};
|
||||
nav.click(function(e) {
|
||||
if (e.target.tagName.toLowerCase() == 'a') return;
|
||||
if (this !== (currentNav && currentNav[0])) {
|
||||
closeMenus();
|
||||
currentNav = $(this);
|
||||
currentNav.addClass('active');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$(document.body).click(function() {
|
||||
closeMenus();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
33
index.html
33
index.html
|
@ -242,7 +242,7 @@ cubed_list = (function() {
|
|||
</p>
|
||||
|
||||
<p>
|
||||
To install, first make sure you have a working version of
|
||||
To install, first make sure you have a working version of
|
||||
<a href="http://nodejs.org/">Node.js</a>, 0.1.30 or higher. Then clone the CoffeeScript
|
||||
<a href="http://github.com/jashkenas/coffee-script">source repository</a>
|
||||
from GitHub, or download the latest
|
||||
|
@ -1621,7 +1621,7 @@ task(<span class="String"><span class="String">'</span>test<span class="String">
|
|||
<span id="change_log" class="bookmark"></span>
|
||||
Change Log
|
||||
</h2>
|
||||
|
||||
|
||||
<p>
|
||||
<b class="header" style="margin-top: 20px;">0.5.0</b>
|
||||
CoffeeScript 0.5.0 is a major release, While there are no language changes,
|
||||
|
@ -1791,24 +1791,45 @@ task(<span class="String"><span class="String">'</span>test<span class="String">
|
|||
<script type="text/javascript" src="lib/nodes.js"></script>
|
||||
<script type="text/javascript" src="lib/coffee-script.js"></script>
|
||||
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.repl_compile = function() {
|
||||
var source = document.getElementById('repl_source').value;
|
||||
var source = $('#repl_source').val();
|
||||
window.compiled_js = '';
|
||||
try {
|
||||
window.compiled_js = CoffeeScript.compile(source, {no_wrap: true});
|
||||
} catch(error) {
|
||||
alert(error);
|
||||
}
|
||||
document.getElementById('repl_results').innerHTML = window.compiled_js;
|
||||
}
|
||||
$('#repl_results').html(window.compiled_js);
|
||||
};
|
||||
window.repl_run = function() {
|
||||
try {
|
||||
eval(window.compiled_js);
|
||||
} catch(error) {
|
||||
alert(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var nav = $('.navigation');
|
||||
var currentNav = null;
|
||||
var closeMenus = function() {
|
||||
if (currentNav) currentNav.removeClass('active');
|
||||
currentNav = null;
|
||||
};
|
||||
nav.click(function(e) {
|
||||
if (e.target.tagName.toLowerCase() == 'a') return;
|
||||
if (this !== (currentNav && currentNav[0])) {
|
||||
closeMenus();
|
||||
currentNav = $(this);
|
||||
currentNav.addClass('active');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$(document.body).click(function() {
|
||||
closeMenus();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue