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 /public/javascripts/hover.js | |
| parent | 25a750d072ff848de7c7904b3b16bc1de076db7a (diff) | |
hover over the racecar
Diffstat (limited to 'public/javascripts/hover.js')
| -rw-r--r-- | public/javascripts/hover.js | 19 |
1 files changed, 16 insertions, 3 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(){ |
