4. Moving elements around


#1

I feel like this is all correct, but it keeps coming up with the error " It looks like your p tag is still after the div tag with ID #one."
I'm totally stuck :confused:

$(document).ready(function(){
$('#one').after('< p >Hey< /p >');
$('#two').after('< p >Sup< /p >');
});


#2

Hi there,

You should probably change your username right now, since it seems to be showing your email address in it.


How would you select a certain element by it's tag name in jQuery?

Hint

$('element')

You'll need to select the p element, then move it after #two. You can do that like this:

$('#two').after($('p'));

Please let me know if you've got any more questions, or are still having trouble with the exercise :)


#3

A post was split to a new topic: What's wrong with this code?


#4

2 posts were split to a new topic: #4, It tells me to add a <p> after the <div> with ID #two - what am I doing wrong?


#5