0

私はかなりの初心者で、まだ学習中で、問題を完全に解決することはできません。以下のコードがあり、スライダーに自動再生機能を追加したいと考えています。大変助かります。

$('.feature-selection').click(function () {
        if (!$(this).hasClass('active-feature')) {
            var featureID = '#' + $(this).attr('data-feature-id');
            $('.active-feature').removeClass('active-feature');
            $(this).addClass('active-feature');
            $('.active-feature-detail').addClass('fadeOutLeftBig');
            setTimeout(function () {
                $('.fadeOutLeftBig').removeClass('active-feature-detail');
            }, 500);
            setTimeout(function () {
                $('.fadeOutLeftBig').removeClass('fadeOutLeftBig');
            }, 600);
            $(featureID).addClass('fadeInRightBig');
            var that = featureID;
            setTimeout(function () {
                $(that).removeClass('fadeInRightBig');
            }, 1000);
            $(featureID).addClass('active-feature-detail');
            var newFeatureHeight = $(featureID).height() + 88;

            $('#feature-detail-holder').css('min-height', newFeatureHeight);
        }
    });
4

1 に答える 1