MediaWiki:Tooltips.js: различия между версиями
Нет описания правки Метка: отменено |
Нет описания правки Метка: ручная отмена |
||
| Строка 1: | Строка 1: | ||
$("[data-tooltip]").mousemove(function (eventObject) { | $("[data-tooltip]").mousemove(function (eventObject) { | ||
$(this).children().find('a').removeAttr('title') | $(this).children().find('a').removeAttr('title') | ||
$(this).parent().remove(); | $(this).parent('p').remove(); | ||
var pos = $(this).position(); | var pos = $(this).position(); | ||
Версия от 23:17, 3 января 2022
$("[data-tooltip]").mousemove(function (eventObject) {
$(this).children().find('a').removeAttr('title')
$(this).parent('p').remove();
var pos = $(this).position();
var width = $(this).outerWidth();
if ($(window).width() < 1023)
return;
$(this).parent().next('.tooltip')
.css({
"top" : (pos.top + 20) + "px",
"left" : (pos.left + width + 5) + "px"
})
.show();
}).mouseout(function () {
$(".tooltip").hide()
.css({
"top" : 0,
"left" : 0
});
});