copy click animation
This commit is contained in:
@@ -64,7 +64,7 @@ body {
|
|||||||
outline: 0;
|
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);
|
box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
js/popup.js
11
js/popup.js
@@ -121,20 +121,23 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
|
|
||||||
$("#courseList").on('mouseover', '.copybut', function () {
|
$("#courseList").on('mouseover', '.copybut', function () {
|
||||||
$(this).addClass('noshadow');
|
$(this).addClass('shadow');
|
||||||
}).on('mouseleave', '.copybut', function () {
|
}).on('mouseleave', '.copybut', function () {
|
||||||
$(this).removeClass('noshadow');
|
$(this).removeClass('shadow');
|
||||||
});
|
});
|
||||||
$("#courseList").on('click', '.copybut', function (e) {
|
$("#courseList").on('click', '.copybut', function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var temp = $("<input>");
|
var temp = $("<input>");
|
||||||
$(this).find('i').text('check');
|
$(this).find('i').text('check');
|
||||||
$(this).stop(true, false).removeAttr('style').removeClass('noshadow', {
|
$(this).stop(true, false).removeAttr('style').removeClass('shadow', {
|
||||||
duration: 200
|
duration: 200
|
||||||
});
|
});
|
||||||
$(this).find('i').delay(400).queue(function (n) {
|
$(this).find('i').delay(400).queue(function (n) {
|
||||||
$(this).text('content_copy');
|
$(this).text('content_copy');
|
||||||
$(this).parent().addClass('noshadow');
|
$(this).parent().removeClass('shadow');
|
||||||
|
if ($(this).parent().is(":hover")) {
|
||||||
|
$(this).parent().addClass('shadow');
|
||||||
|
}
|
||||||
n();
|
n();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user