-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1761 from publishpress/release-v4.5.0
Release v4.5.0
- Loading branch information
Showing
33 changed files
with
3,788 additions
and
3,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
(function ($) { | ||
'use strict'; | ||
|
||
/** | ||
* All of the code for admin-facing JavaScript source | ||
* should reside in this file. | ||
*/ | ||
|
||
$(document).ready(function () { | ||
|
||
initToolTips(); | ||
function initToolTips() { | ||
$('.pp-title-tooltip').each(function() { | ||
var $this = $(this); | ||
var titleText = $this.attr('title'); | ||
|
||
if (titleText && titleText !== '') { | ||
$this.removeAttr('title'); | ||
|
||
var $tooltip = $('<div class="pp-title-tooltip-text"></div>').text(titleText); | ||
$('body').append($tooltip); | ||
|
||
$this.hover(function() { | ||
$tooltip.show(); | ||
|
||
// Adjust the tooltip position to account for the arrow | ||
var tooltipTop = $this.offset().top - $tooltip.outerHeight() - 10; // Position 10px above the element | ||
var tooltipLeft = $this.offset().left + ($this.outerWidth() / 2) - ($tooltip.outerWidth() / 2); | ||
|
||
$tooltip.css({ | ||
top: tooltipTop + 'px', | ||
left: tooltipLeft + 'px', | ||
position: 'absolute' | ||
}); | ||
}, function() { | ||
$tooltip.hide(); | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
}); | ||
|
||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.