Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator, Widget editors
154
edits
(Undo revision 2568 by TransportLayer (talk)) Tag: Undo |
(Added fancy hover) |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
// Fency hovers for recipes | |||
$(function() { | |||
// Tooltip only Text | |||
$('.masterTooltip').hover(function(){ | |||
// Hover over code | |||
var title = $(this).attr('title'); | |||
$(this).data('tipText', title).removeAttr('title'); | |||
$('<p class="tooltip">' + title + '</p>') | |||
//.text(title + "\n1") | |||
.appendTo('body') | |||
.show(); | |||
}, function() { | |||
// Hover out code | |||
$(this).attr('title', $(this).data('tipText')); | |||
$('.tooltip').remove(); | |||
}).mousemove(function(e) { | |||
var mousex = e.pageX + 20; //Get X coordinates | |||
var mousey = e.pageY - 40; //Get Y coordinates | |||
$('.tooltip').css({ top: mousey, left: mousex }); | |||
}); | |||
}); |
edits