swapElements

Swaps the positions of two elements in the DOM.

swapElements()

Parameters:

  • elementA: The first DOM element to swap.

  • elementB: The second DOM element to swap.

Usage:

swapElements($('#element1'),$('#element2'));

Last updated