Jquery elements


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/web-beginner-en-v6phg/0/4?curriculum_id=50a3fad8c7a770b5fd0007a1

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Says that

was not applied after the div and id two.

```

Replace this line with your code.

<do not remove the three backticks above>

#2

Could you give us the code you are using ??

Reference:
http://api.jquery.com/after/


#3

https://www.codecademy.com/courses/web-beginner-en-v6phg/0/4?curriculum_id=50a3fad8c7a770b5fd0007a1

$(document).ready(function() {
$(’#one’).before(“

Greetings

”);
$(’#two’).after(“

Dude

”);
});

#4

In the index.html you have defined

        <div class="container">
            <h2>Greetings</h2>
            <div id="one">Div #1</div>
            <div id="two">Div #2</div>
        </div>   

What they want you to is

in the 1st step

create a <p>-Tag positioned =after= the <div> with id="one"
thus having

        <div class="container">
            <h2>Greetings</h2>
            <div id="one">Div #1</div>
               <p> created a p-Tag <p>
            <div id="two">Div #2</div>
        </div>

in the 2nd step

pick up this just created

-Tag and move it over to be =after= the

with id="two"
thus in the end having
        <div class="container">
            <h2>Greetings</h2>
            <div id="one">Div #1</div>
            <div id="two">Div #2</div>
               <p> created a p-Tag <p>
        </div>

==the Book==
http://api.jquery.com/after/


#5

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