We're also simplifying the code a bit by removing the `participation-allowed` HTML class, which wasn't used in any other votes component.
22 lines
572 B
JavaScript
22 lines
572 B
JavaScript
(function() {
|
|
"use strict";
|
|
App.Votes = {
|
|
hoverize: function(votes) {
|
|
$(document).on({
|
|
"mouseenter focus": function() {
|
|
$("div.participation-not-allowed", this).show();
|
|
},
|
|
mouseleave: function() {
|
|
$("div.participation-not-allowed", this).hide();
|
|
}
|
|
}, votes);
|
|
},
|
|
initialize: function() {
|
|
App.Votes.hoverize("div.votes");
|
|
App.Votes.hoverize("div.supports");
|
|
App.Votes.hoverize("div.debate-questions");
|
|
App.Votes.hoverize("div.comment-footer");
|
|
}
|
|
};
|
|
}).call(this);
|