@Sashochek

Как можно сократить эту простыню?

$('.first-select_visible').on('click', function () {
    $('.second-select').fadeOut(100);
    $('.third-select').fadeOut(100);
    $('.fourth-select').fadeOut(100);
    $('.first-select').delay(100).fadeIn();
  });

  $('.second-select_visible').on('click', function () {
    $('.first-select').fadeOut(100);
    $('.third-select').fadeOut(100);
    $('.fourth-select').fadeOut(100);
    $('.second-select').delay(100).fadeIn();
  });

   $('.third-select_visible').on('click', function () {
    $('.first-select').fadeOut(100);
    $('.second-select').fadeOut(100);
    $('.fourth-select').fadeOut(100);
    $('.third-select').delay(100).fadeIn();
  });

   $('.fourth-select_visible').on('click', function () {
    $('.first-select').fadeOut(100);
    $('.second-select').fadeOut(100);
    $('.third-select').fadeOut(100);
    $('.fourth-select').delay(100).fadeIn();
  });

   $('.clear-select_visible').on('click', function () {
    $('.first-select').fadeOut(100);
    $('.second-select').fadeOut(100);
    $('.third-select').fadeOut(100);
    $('.fourth-select').fadeOut(100);
  });
  • Вопрос задан
  • 248 просмотров
Решения вопроса 1
Пригласить эксперта
Ответы на вопрос 1
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы