Shows anonymous messages on focus whit tab
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
App.Votes =
|
||||
|
||||
hoverize: (votes) ->
|
||||
$(votes).hover ->
|
||||
$("div.anonymous-votes", votes).show();
|
||||
$("div.organizations-votes", votes).show();
|
||||
$("div.not-logged", votes).show();
|
||||
$("div.no-supports-allowed", votes).show();
|
||||
$("div.logged", votes).hide();
|
||||
, ->
|
||||
$("div.anonymous-votes", votes).hide();
|
||||
$("div.organizations-votes", votes).hide();
|
||||
$("div.not-logged", votes).hide();
|
||||
$("div.no-supports-allowed", votes).hide();
|
||||
$("div.logged", votes).show();
|
||||
$(document).on {
|
||||
'mouseenter focus': ->
|
||||
$("div.anonymous-votes", this).show();
|
||||
$("div.organizations-votes", this).show();
|
||||
$("div.not-logged", this).show();
|
||||
$("div.no-supports-allowed", this).show();
|
||||
$("div.logged", this).hide();
|
||||
mouseleave: ->
|
||||
$("div.anonymous-votes", this).hide();
|
||||
$("div.organizations-votes", this).hide();
|
||||
$("div.not-logged", this).hide();
|
||||
$("div.no-supports-allowed", this).hide();
|
||||
$("div.logged", this).show();
|
||||
}, votes
|
||||
|
||||
initialize: ->
|
||||
App.Votes.hoverize votes for votes in $("div.votes")
|
||||
App.Votes.hoverize votes for votes in $("div.supports")
|
||||
App.Votes.hoverize "div.votes"
|
||||
App.Votes.hoverize "div.supports"
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user