mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-31 08:57:15 +00:00
clipboard: fix tooltip position for block code #175
This commit is contained in:
parent
9f7308ca4c
commit
fb9f06d98e
1 changed files with 2 additions and 2 deletions
|
@ -347,12 +347,12 @@ jQuery(function() {
|
|||
|
||||
clip.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
var inPre = $(e.trigger).parent().prop('tagName') == 'PRE';
|
||||
var inPre = $(e.trigger).parent().parent().prop('tagName') == 'PRE';
|
||||
$(e.trigger).attr('aria-label', 'Copied to clipboard!').addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's'));
|
||||
});
|
||||
|
||||
clip.on('error', function(e) {
|
||||
var inPre = $(e.trigger).parent().prop('tagName') == 'PRE';
|
||||
var inPre = $(e.trigger).parent().parent().prop('tagName') == 'PRE';
|
||||
$(e.trigger).attr('aria-label', fallbackMessage(e.action)).addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's'));
|
||||
$(document).one('copy', function(){
|
||||
$(e.trigger).attr('aria-label', 'Copied to clipboard!').addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's'));
|
||||
|
|
Loading…
Add table
Reference in a new issue