Permalink
Browse files

demo tweaks

  • Loading branch information...
1 parent a70ab2e commit 4e00c5bff813e33ffe02be30e5f031769c762832 @davidguttman committed Apr 3, 2012
Showing with 16 additions and 3 deletions.
  1. +4 −1 css/style.css
  2. +6 −0 index.html
  3. +6 −2 js/demo.js
View
@@ -1,6 +1,9 @@
a {
color: #4eb6e1; }
+a:hover {
+ color: #5ec6f1; }
+
body {
background: #121212;
color: #d5d5d5;
@@ -15,7 +18,7 @@ body {
#main #header {
background-color: #676767;
border-bottom: 1px solid #4f4f4f;
- height: 280px;
+ height: 200px;
position: relative; }
#main #header #demo {
position: absolute;
View
@@ -29,6 +29,10 @@ <h1>EasyEars.js</h1>
<div class="section">
<h2>Getting Started</h2>
<p>
+ First, grab the <a href="https://raw.github.com/davidguttman/easy-ears/master/lib/easy_ears-0.1.js" target="_blank">code</a>.
+ </p>
+ <p>Second, create an instance like so:</p>
+ <p>
<pre>
var ears = new EasyEars({
dropTarget: document
@@ -51,6 +55,8 @@ <h2>A (Live) Example</h2>
</div>
+ <a href="http://github.com/davidguttman/easy-ears"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
+
<script src="./js/easy_ears-0.1.js"></script>
View
@@ -41,8 +41,12 @@
codeExample = document.getElementById('code_example');
codeExample.value = draw.toString();
codeExample.addEventListener('keyup', function(){
- // console.log(codeExample.value);
- draw = eval("draw = " + codeExample.value);
+ try {
+ draw = eval("draw = " + codeExample.value);
+ } catch(err) {
+ // less good...
+ }
+
}, false)
ears = new EasyEars({

0 comments on commit 4e00c5b

Please sign in to comment.