View source for MediaWiki:Common.js
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
/* Any JavaScript here will be loaded for all users on every page load. */
// Even More fancy hovers for recipes
$(function() {
// Tooltip only Text
$('.masterTooltip').hover(function(){
// Hover over code
var title = $(this).attr('title');
$(this).data('tipText', title).removeAttr('title');
// Add formating with &
var codes = title.match(/&[0-9a-fl-o]/g)
var classes = codes.map(function(x){return 'format-' + x[1]}).join(' ')
$('<p class="tooltip ' + classes + '">' + title.slice(codes.length * 2) + '</p>')
//.text(title + "\n1")
.appendTo('body')
.show();
}, function() {
// Hover out code
$(this).attr('title', $(this).data('tipText'));
$('.tooltip').remove();
000
1:0
Return to MediaWiki:Common.js.