Interactive Website: Flipboard example error


My dots were not navigating properly. I was allowed to pass the course, but the code is in error. There is an error in the example code in the beginning of the exercise. This error is replicated later in the instructions the file app.js, in the portion of the exercise dealing with the previous dots. The following is a copy of the code in error:

$('.arrow-prev').click(function() {
var currentSlide = $('.active-slide');
var prevSlide = currentSlide.prev(); <---ERROR
var currentDot=$('.active-dot');
var prevDot= currentDot.prev(); <---ERROR

It should be method .previous().

There is also an error in the entire exercise because the "More" link does not appear on the page as referenced in the instructions.

I was able to find and fix the .previous() bug, but not the "More" link bug. Thought I would post in case anybody else runs into this bug.


Hi @mliseaglerock2014,

This is incorrect. jQuery does have a prev() method, but no previous() method. Using previous() instead of prev() shouldn't have worked at all. Would you mind posting your full code so I can try to help you solve these two issues?

Please see here for how to format your code properly:


Hi Zeke,
Thanks for your reply. I reviewed the JQuery documentation and see that you are correct about prev() method. However, perhaps there was an original error somewhere in the program? When I changed the .prev() method in "Flipboard" lesson 12 to previous() it highlighted the method previous() in orange text and passed me. This was the behavior last night, and the orange highlight text persists today. However, today, I get an error message in the lesson stating that "TypeError: currentDot.previous() is not a function." I changed it back to prev() and it allowed me to pass. Somehow, bug was fixed automagicly!

I have not submitted code in this reply as I did post a code snippet in my original post, and the prev() method appears to behave correctly now. I don't know if a bug still exist in the interpreter, or there is some other reason for the method "previous()" being highlighted orange.

Again, thank you for your help on this and I consider this exercise completed.


This topic is solved.