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