diff --git a/css/popup.css b/css/popup.css index 5b022c52..776c0461 100644 --- a/css/popup.css +++ b/css/popup.css @@ -64,7 +64,7 @@ body { outline: 0; } -.noshadow { +.shadow { box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.16); } diff --git a/js/popup.js b/js/popup.js index cec4e2e0..938c5303 100644 --- a/js/popup.js +++ b/js/popup.js @@ -121,20 +121,23 @@ $(document).ready(function () { $("#courseList").on('mouseover', '.copybut', function () { - $(this).addClass('noshadow'); + $(this).addClass('shadow'); }).on('mouseleave', '.copybut', function () { - $(this).removeClass('noshadow'); + $(this).removeClass('shadow'); }); $("#courseList").on('click', '.copybut', function (e) { e.stopPropagation(); var temp = $(""); $(this).find('i').text('check'); - $(this).stop(true, false).removeAttr('style').removeClass('noshadow', { + $(this).stop(true, false).removeAttr('style').removeClass('shadow', { duration: 200 }); $(this).find('i').delay(400).queue(function (n) { $(this).text('content_copy'); - $(this).parent().addClass('noshadow'); + $(this).parent().removeClass('shadow'); + if ($(this).parent().is(":hover")) { + $(this).parent().addClass('shadow'); + } n(); })