mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 21:53:26 +00:00
Improve the UX of clipboard button
This commit is contained in:
@@ -41,7 +41,7 @@ $(function() {
|
||||
});
|
||||
|
||||
$(btnSelector).tooltip({
|
||||
trigger: 'click',
|
||||
trigger: 'hover',
|
||||
placement: 'left'
|
||||
});
|
||||
|
||||
@@ -53,11 +53,12 @@ $(function() {
|
||||
const ICON_DEFAULT = getIcon(btnSelector);
|
||||
|
||||
function showTooltip(btn) {
|
||||
$(btn).tooltip('show');
|
||||
const succeedTitle = $(btn).attr('title-succeed');
|
||||
$(btn).attr('data-original-title', succeedTitle).tooltip('show');
|
||||
}
|
||||
|
||||
function hideTooltip(btn) {
|
||||
$(btn).tooltip('hide');
|
||||
$(btn).tooltip('hide').removeAttr('data-original-title');
|
||||
}
|
||||
|
||||
function setSuccessIcon(btn) {
|
||||
|
||||
Reference in New Issue
Block a user