GoConqr has a new look! Let us know what you think.

Module 12 of 15 · Media

On the Fly

Kostas Diakogiannis

On the Fly

Create Content on the fly!

If you want to create content on the fly, you will have to use these functions most of the time.

$(element).append(anotherElement) => equivalent to appendChild

$(element).prepend(anotherElement) => Puts the child at the beginning of the element.

$(element).after(anotherElement) => Equivalent to insertAdjacentElement();

$(element).before(anotherElement) => Adds a sibling exactly before the element.

Inserting multiple html elements also possible!

$(element).append(firstElement, secondElement, thirdElement) => appends firstElement, secondElement, thirdElement);

 

Bear in mind: Still you have to create somehow the element from the beginning (with the createElement() function probably).

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?