MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Altes Köln
Simon (Diskussion | Beiträge) (Bootstrap-Styling für Tooltip) |
Simon (Diskussion | Beiträge) (Zeitverzögerung für Tooltip-Einblendung) |
||
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 6: | Zeile 6: | ||
$(function() { | $(function() { | ||
$('.ak-text-with-tooltip').each(function() { | $('.ak-text-with-tooltip').each(function() { | ||
− | $(this).qtip({ | + | var $this = $(this); |
+ | $this.qtip({ | ||
content: { | content: { | ||
− | text: $ | + | text: $this.next('.ak-tooltip-text'), |
+ | title: { | ||
+ | text: $this.data('title'), | ||
+ | button: true | ||
+ | } | ||
}, | }, | ||
style: { | style: { | ||
def: false, | def: false, | ||
− | classes: 'qtip-bootstrap' | + | classes: 'qtip-shadow qtip-bootstrap ak-tooltip' |
}, | }, | ||
position: { | position: { | ||
Zeile 20: | Zeile 25: | ||
show: { | show: { | ||
event: 'click focus mouseenter', | event: 'click focus mouseenter', | ||
− | solo: true | + | solo: true, |
− | } | + | delay: 500 |
+ | }, | ||
+ | hide: 'unfocus' | ||
}); | }); | ||
}); | }); | ||
}); | }); |
Aktuelle Version vom 19. August 2019, 18:40 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ /* Tooltips */ $(function() { $('.ak-text-with-tooltip').each(function() { var $this = $(this); $this.qtip({ content: { text: $this.next('.ak-tooltip-text'), title: { text: $this.data('title'), button: true } }, style: { def: false, classes: 'qtip-shadow qtip-bootstrap ak-tooltip' }, position: { my: 'bottom center', at: 'top center' }, show: { event: 'click focus mouseenter', solo: true, delay: 500 }, hide: 'unfocus' }); }); });