mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 17:59:21 +02:00
Add user feedback near mouse cursor when voting to a song (democratic playlist)
This commit is contained in:
parent
b7a76aa133
commit
a157856675
6 changed files with 49 additions and 6 deletions
|
@ -19,6 +19,7 @@
|
|||
//
|
||||
$(document).ready(function () {
|
||||
initTabs();
|
||||
$(document).mousemove(mouse_message_move);
|
||||
});
|
||||
|
||||
function initTabs()
|
||||
|
@ -85,6 +86,25 @@ function toggleVisible(element) {
|
|||
}
|
||||
}
|
||||
|
||||
var mouseTimeout = null;
|
||||
function mouseMessage(message, timeout) {
|
||||
if (mouseTimeout != null) {
|
||||
clearTimeout(mouseTimeout);
|
||||
mouseTimeout = null;
|
||||
}
|
||||
$('#mouse_message').html(message);
|
||||
$('#mouse_message').fadeIn();
|
||||
mouseTimeout = setTimeout(function() {
|
||||
$('#mouse_message').fadeOut();
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function mouse_message_move(e) {
|
||||
$('#mouse_message').css({top: e.clientY + 10,
|
||||
left: e.clientX + 10
|
||||
});
|
||||
}
|
||||
|
||||
// delayRun
|
||||
// This function delays the run of another function by X milliseconds
|
||||
function delayRun(element, time, method, page, source) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue