Preview window does not respond or interact with my code


#1



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


When I submit my code, I can continue and i think my code is good. But none of the changes i make in the code also change in the preview (for example: nothing happens when I click on a news article.

Do i have to update something in my browser or something?


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

$(document).ready(main);


#2

Hi @tomhuibers333,

Your code looks fine to me, and I can't see why it wouldn't do anything in the preview. Could you try refreshing the page or switching browsers?


#3

I have the same code and the same problem, I am using Microsoft Edge for my browser, but I downloaded Google Chrome and I still can't get it to work. The lesson says I have everything right and I've refreshed the page several times. I have no idea what's going on!


#4

@aenion The code in the original post works fine for me using Firefox ¯\_(ツ)_/¯

So clicking on an article won't open it for you?


#5

No it wouldn't I just cleared my browsers cache and restarted it and it works now. I don't know why it wasn't before.