mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix animate effect
This commit is contained in:
parent
d43d8db6c5
commit
8d87df2f59
@ -21,9 +21,11 @@ $(function() {
|
||||
});
|
||||
|
||||
$('.code-boxes').on('click', '.collapse', function() {
|
||||
$(this).parent().parent().find('.highlight').animate({
|
||||
height: 'toggle',
|
||||
opacity: 'toggle'
|
||||
var highlightBox = $(this).parent().parent().find('.highlight');
|
||||
console.log(highlightBox.is(':visible'));
|
||||
highlightBox.animate({
|
||||
height: highlightBox.is(':visible') ? 'hide' : 'show',
|
||||
opacity: highlightBox.is(':visible') ? 0 : 1
|
||||
}, 150);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user