Append to Body


#1


https://www.codecademy.com/courses/web-beginner-en-v6phg/2/3?curriculum_id=50a3fad8c7a770b5fd0007a1#


Hi guys,

сould you please check my code and tell me what is wrong here?
Up to this point I was getting all the time for some error message, something like this: "Oops ...."

Thank You,
Mark


$(document).ready(function() {
    $('#button').click(function() {
        var toAdd = $('input[name=checkListItem]').val();
        $('.list').append('<div class="item">' + toAdd + '</div>');
    });
});


#2

@markkarnaukh
Could you mention the Oops-message in detail.....


#3

The fact of the matter: this error message appeared until a certain moment when I pressed "Submit & ...", and then it ceased to appear at the same time despite the fact that I did not change the code ... Сheck showed that the code was accepted! I just want to know if there is an syntax error or not. Thanks a lot!


#4

Thanks Leonard,

I've figured out where there was a problem.
Error message: "Oops, try again. Please follow the instructions on the Full Preview page to test your code."


#5

@markkarnaukh
Also keep in mind
that a refresh Browser can do wonders...
++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#6

Thank your for your assistance! :slight_smile:


#7

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