To insert html content of the source element to the beginning of the target element, prependTo()
method can be used.
<script> $("p").prependTo("#div2"); </script>
Above code snippet will write all paragraph elements of the page before the element whose id is “div2".
Views: 4642 | Post Order: 33