Modifying HTML Elements #3. Before and After


Oops, try again. Did you create a variable called $h1?

    var $h1 = $('<h1>Hello</h1>');

is this a glitch?


I'm stuck a few parts ahead


Oops, try again. It looks like you didn't insert your <p after the <div with ID #one.


your code: $("#one").after("p>Hello</p");
Comment: you are missing the opening "<" and ">" on p.

myCode: $("#one").after('

This is the inserted line between div1 & div2



you don't need the document.ready
this will sufice.
$h1 = $("




you don't need the document.ready
this will suffice.
$h1 = $("Hello");


Is there such an element as, Hello? No.

$h1 = $('<h1>Hello</h1>');


the reason there is no opening and closing < > is because then it would be considered code by the webpage


I figured the parts on my own


var $h1 = $('




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