Jquery code preview

The bug I would like to report is a bug in general, it does not occur only in this lesson but also in previous lessons.

As you see on the little preview window everything looks ok and when the Add button is pressed it appends stuff. But when I focus on the text input field and if I press enter after, everything on that window disappears.

Thank you.

Could you provide the script.js code you are using in ASCII format…

1 Like

Hi, it is the default of the lesson, I havent changed anything.

(document).ready(function() { (‘button’).click(function() {
var toAdd = ("input[name=message]").val(); (’#messages’).append("



Are you looking for

1 Like

Nope, I think I didnt explain it clear. What I am reporting is a bug that in jquery lessons (I tried it on a few). When there is an input field, and if I press enter after focusing in this input field everything in that white little preview window disappears. Could you please go to the lesson of Review of jQuery Events and as soon as it opens focus on the input field(whether there is something written or not) then press Enter? I apologise that I am not good at explaining stuff but I believe you will get my point if you can try it as I did so.

Thank you!

It seems that the HTML DOM has a “form” element that seems even unnecessary in the lesson, thus whenever Enter is pressed it tries to redirect the page to an non exiting one. I am not in the position to suggest a solution to CodeAcademy but I would like to know why there is a “form” element ?

Maybe you are looking for



Thank you !

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