Есть изначально setInterval. При клике на ЛИ надо остановить этот интервал (ID 1). После выполнения действий опять вызываем setInterval(hideLi, 4000); При повторном клике нужно отменить все setInterval выполнить действия и опять запустить setInterval и так по кругу.
Не могу понять как отменить setInterval который вызываю в событии (клик). Кто знает подскажите. Спасибо...
setInterval(hideLi, 4000); // ID 1
$('.bottom ul li').click(function() {
clearInterval(1);
$('.bottom ul li img').hide();
$('.bottom ul li').removeClass('active');
$(this).addClass('active');
if ($('.bottom ul li:last-child').hasClass('active')) {
setTimeout("$('.bottom ul li:last-child').removeClass('active')", 4000);
setTimeout("$('.bottom ul li:first-child').addClass('active')", 4000);
setTimeout("$('.bottom ul li:first-child img').fadeIn(1990).fadeOut(1990)", 4000);
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
cupWebCode
Кто знает подскажите. Спасибо...
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.