7/10 7. The o shortcut


#1

I have a problem with this stage of Make an Interactive Website.
Error:Oops, try again.
Make sure you have defined all the variables!

My Code:

var main = function() {
    $('.article').click(function() {
        $('.article').removeClass('current');
        $('.description').hide();
        
        $(this).addClass('current');
        $(this).children('.description').show();
        });
        
    $(document).keypress(function(ever){
        if(event.which === 111) {
            $('.current').children('.description').toggle();
            }
    });
    };
    
    $(document).ready(main);

#2

@tony_palach

function(ever)
you must write event , no ever. if fix it an not succesful at this...

refresh the page and test again, if not solved see the instructions. if all of them was done and you get error insert the link of course to see and check that


#3

I really didnt notice this. Thank you


#4

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