MediaWiki:Tooltips.js: различия между версиями
Нет описания правки |
Нет описания правки |
||
| Строка 12: | Строка 12: | ||
return; | return; | ||
$(this | $(this).next('.tooltip') | ||
.css({ | .css({ | ||
"top" : (pos.top + 20) + "px", | "top" : (pos.top + 20) + "px", | ||
Версия от 23:39, 3 января 2022
$(document).ready(function() {
$("[data-tooltip]").unwrap()
});
$("[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).next('.tooltip')
.css({
"top" : (pos.top + 20) + "px",
"left" : (pos.left + width + 5) + "px"
})
.show();
}).mouseout(function () {
$(".tooltip").hide()
.css({
"top" : 0,
"left" : 0
});
});