diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-01-28 12:19:23 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-01-28 12:19:23 -0500 |
| commit | a88e07c8f8e98c44051641450ea610998322cc1d (patch) | |
| tree | e946ce0bfdb92e27770eb05d233cb5f9ad6d4b14 | |
| parent | 25a750d072ff848de7c7904b3b16bc1de076db7a (diff) | |
hover over the racecar
| -rw-r--r-- | public/javascripts/hover.js | 19 | ||||
| -rw-r--r-- | public/stylesheets/style.css | 3 | ||||
| -rw-r--r-- | views/hover.ejs | 13 |
3 files changed, 31 insertions, 4 deletions
diff --git a/public/javascripts/hover.js b/public/javascripts/hover.js index 1f648e1..fd91ec5 100644 --- a/public/javascripts/hover.js +++ b/public/javascripts/hover.js @@ -65,13 +65,13 @@ var game = { }); $(window).bind({ blur: function (e) { - $("#really_waiting").html("BLUR"); + // $("#really_waiting").html("BLUR"); socket.emit('blur', { id: _id }); own_cursor.blur(); }, focus: function (e) { - $("#really_waiting").html("FOCUS"); - socket.emit('focus', { id: _id }); + // $("#really_waiting").html("FOCUS"); + // socket.emit('focus', { id: _id }); own_cursor.focus(); }, mousemove: function(e){ @@ -79,6 +79,19 @@ var game = { own_cursor.el.css({ 'left': e.pageX, 'top': e.pageY }); } }); + + var hovering = false; + own_cursor.blur(); + $("#racecar").bind({ + mouseover: function(){ + socket.emit('focus', { id: _id }); + own_cursor.focus(); + }, + mouseout: function(){ + socket.emit('blur', { id: _id }); + own_cursor.blur(); + } + }); $(".okfocus").bind({ mouseover: function(){ diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 23c434f..415a0ad 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -357,6 +357,7 @@ header { } .cursor { + pointer-events: none; position: absolute; bottom: 50%; right: 50%; @@ -459,4 +460,4 @@ ol { } .okfocus img { width: 100px; -}
\ No newline at end of file +} diff --git a/views/hover.ejs b/views/hover.ejs index be7fc77..14d3187 100644 --- a/views/hover.ejs +++ b/views/hover.ejs @@ -33,6 +33,17 @@ <% } %> +<style> +#racecar { + position: absolute; + top: 50%; + left: 50%; + width: 432px; + height: 125px; + margin-left: -216px; + margin-top: -62px; +} +</style> </head> <body> <h1>WAIT SITE</h1> @@ -55,6 +66,8 @@ <a href="/auth/facebook"class="fbutton"></a><br> <% } %> </header> + + <img src="/images/racecar.png" id="racecar"> <a href="mailto:frontdesk@okfoc.us?subject=hello OKFocus" class="okfocus"><img src="/images/okfocus_logo.png" alt="OKFocus"><br>hire us!</a> <div id="cursors"></div> |
