.html() to Replace Text Not Working


This is the link to the exact exercise I'm stuck at: https://www.codecademy.com/courses/web-beginner-en-v6phg/1/4?curriculum_id=50a3fad8c7a770b5fd0007a1

The code does not render the new text when the code is saved. I get two error messages:

  1. "Uncaught SyntaxError: Unexpected token {"
  2. Oops, try again. It looks like your paragraph's text isn't 'jQuery magic in action!'

I'm pretty sure the { is supposed to be there and I can't figure out why it's not working. Please help, my code is below:

$(document).ready(function {
    $('p').html("jQuery magic in action!");


you need brackets () for function




OMG! Thank you soo much. I knew it had to be something simple like that. I guess I was just paying too much attention to the 2nd line.

Thanks again! :smiley:


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