clone()
that makes a copy of an element.
For example, if we wanted to copy target2
from our left-well
to our right-well
, we would use:
$("#target2").clone().appendTo("#right-well");
Did you notice this involves sticking two jQuery functions together? This is called function chaining
and it's a convenient way to get things done with jQuery.
Clone your target5
element and append it to your left-well
.
target5
element should be inside your right-well
.
testString: assert($("#right-well").children("#target5").length > 0, 'Your target5
element should be inside your right-well
.');
- text: A copy of your target5
element should also be inside your left-well
.
testString: assert($("#left-well").children("#target5").length > 0, 'A copy of your target5
element should also be inside your left-well
.');
- text: Only use jQuery to move these elements.
testString: assert(!code.match(/class.*animated/g), 'Only use jQuery to move these elements.');
```