Answer the question
In order to leave comments, you need to log in
How to set click limits js?
Hello, I have this code
$('.home-dot').on('click',function(){
var idx = $(this).index()
$('.home-dot').removeClass('active')
$(this).addClass('active')
})
Answer the question
In order to leave comments, you need to log in
As an example:
I 'm highlighting blocks with red styles just to demonstrate that at this point, clicking again on this block or any .home-dot will not work. Put 2 seconds for clarity.
I want to show the one on which .active
is now.
It can be made even simpler and completely different, but I think the logic is clear.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question