Bug regarding quotes


#1



https://www.codecademy.com/courses/web-beginner-en-4hxyb/0/4?content_from=make-an-interactive-website%3Ajquery-events#


I noticed a bug, where the program says you did not write it correctly. I found out that the reason for this is, that I cannot use different quotes as are in the instructions manual, so that means that quotes that worked in previous exercise (") now do not work because I need to replace them with different quotes ('). I noticed this bug in many other exercises. I do not know if this issue is in all of them, but you could really fix this problem to make your exercises even more enjoyable.


var main = function () {
    $(".article").click(function(){
       $(".description").hide() ;   
        $(this).children(".description").show();
        });
    }
    
    
    
    $(document).ready(main);


#2

That is odd. Just tried writing this and it passes...

var main = function(){
    $('.article').click(function(){
        $('.description').hide();
        $(this).children('.description').show();
    });
};
$(document).ready(main);

#3

Yes, it passes because those quotes were in the instructions, but if you try these quotes (" ") it does not work...
By the way thanks for your reply.


#4

Ah, I see what you mean. Double quotes will not pass the lesson checker. Not much we can do about that. The SCT was written by the author to match exact patterns given in the instructions.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.