What's wrong with this code?


var $paragraph = $("p");

pls help me...what is wrong with the code?
I couldn't find the "post a question section", sorry for asking here.

4. Moving elements around

Hi Srivani,

Please post

  1. A link to the exercise you're on
  2. The error message you're getting



You don't need $ at var paragraph = $('p');, you just use keyword var, you use $ in PHP for variables.
So your code should look like this

$(document).ready(function() {
  var paragraph = $("p");


why does the site show an assignment of:
var $paragraph = $("p");
when it causes an error after we run it??


If I run the exact code you have posted I get:

Oops, try again. It looks like you didn't add a p after the

with ID #two.


Can you post your exact code? I was just referring to the OP's code and explained him how to make a variable (with var, not $).