mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
slideToggle
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
$(function() {
|
||||
$('.component-demos .icon-all').on('click', function() {
|
||||
if ($(this).hasClass('expand')) {
|
||||
$(this).removeClass('expand');
|
||||
$('.code-box .highlight').animate({
|
||||
height: 'hide',
|
||||
opacity: 0
|
||||
}, 150);
|
||||
} else {
|
||||
$(this).addClass('expand');
|
||||
$('.code-box .highlight').animate({
|
||||
height: 'show',
|
||||
opacity: 1
|
||||
}, 150);
|
||||
}
|
||||
//if ($(this).hasClass('expand')) {
|
||||
// $(this).removeClass('expand');
|
||||
// $('.code-box .highlight').animate({
|
||||
// height: 'hide',
|
||||
// opacity: 0
|
||||
// }, 150);
|
||||
//} else {
|
||||
// $(this).addClass('expand');
|
||||
// $('.code-box .highlight').animate({
|
||||
// height: 'show',
|
||||
// opacity: 1
|
||||
// }, 150);
|
||||
//}
|
||||
$('.code-box .highlight').slideToggle(150);
|
||||
});
|
||||
|
||||
$('.code-box').each(function(i, item) {
|
||||
@@ -21,10 +22,11 @@ $(function() {
|
||||
});
|
||||
|
||||
$('.code-boxes').on('click', '.collapse', function() {
|
||||
$(this).parent().parent().find('.highlight').animate({
|
||||
height: 'toggle',
|
||||
opacity: 'toggle'
|
||||
}, 150);
|
||||
//$(this).parent().parent().find('.highlight').animate({
|
||||
// height: 'toggle',
|
||||
// opacity: 'toggle'
|
||||
//}, 150);
|
||||
$(this).parent().parent().find('.highlight').slideToggle(150);
|
||||
});
|
||||
|
||||
var navFunc = {
|
||||
|
||||
Reference in New Issue
Block a user