This forum is now read-only. Please use our new forums! Go to forums
(7/12) Why won't my dot wrap around to the first dot?
I’ve been through my code several times looking for a problem, and I just can’t see one. But when I get to the last dot, it will not wrap around.
var main = function() {
$('.dropdown-toggle').click(function() {
$('.dropdown-menu').toggle();
});
$(‘.arrow-next’).click(function() { var currentSlide = $(‘.active-slide’) var nextSlide = $(‘.active-slide’).next();
if(nextSlide.length == 0) {
nextSlide = $('.slide').first();
nextDot = $('.dot').first();
}
currentSlide.fadeOut(600).removeClass('active-slide');
nextSlide.fadeIn(600).addClass('active-slide');
var currentDot = $('.active-dot');
var nextDot = currentDot.next();
currentDot.removeClass('active-dot');
nextDot.addClass('active-dot');
});
}; $(document).ready(main);
Thanks in advance!
Answer 54736d569c4e9d7317000565
Answer 551de35695e378a3460001ec
0 votes
if u have done everything right and it still brings up the error statement, do the following:
- go back to 1.1-preview
- copy the entire code from beginning to the very end.
- go back to 1.7 again
- erase everything u have typed. then paste the content of 1.1
- then erase codes up till were u were stuck …i.e leave only codes that u have type earlier from 1.2 to 1.7
- click on submit
- cheers.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
6 comments
Of course, it seems so obvious now. Thank you!
WRONG COULDN’T BE MORE WRONGGGGgG!
Honestly I agree with “Dustin Gunter”. There isn’t any possible way that this couldn’t be more wrong!
Lovely. Thanks for being polite about it.
You also might explain why you think it’s wrong. That might be helpful.
because you forgot your script tags !