jQuery API

DOM Insertion, Outside


These methods allow us to insert new content outside an existing element.

  • .after()

    Insert content, specified by the parameter, after each element in the set of matched elements.

  • .before()

    Insert content, specified by the parameter, before each element in the set of matched elements.

  • .insertAfter()

    Insert every element in the set of matched elements after the target.

  • .insertBefore()

    Insert every element in the set of matched elements before the target.

Time to cache: 0.00035