Insert content at the beginning of an specified

.prepend()


Description: Insert content at the beginning of each of the matched elements.


Example:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>prepend example</title>
  <script src="http://code.bitsycode.com/bitsycode-latest.min.js"></script>
</head>
<body>
 
<p>is the name of this framework.</p>

<script>
  bitsyCode( "p" ).prepend('<strong>BitsyCode</strong>');
</script>
 
</body>
</html>

Preview:

BitsyCode is the name of this framework.

  • Usage

    • How to use:

      Insert content at the beginning of an element using .prepend()

    • USAGE:

      bitsyCode(".element").prepend("html/text/element");
  • Options

    • What options are there:

      There are no options required, however you will need to specify content to insert at the beginning of the matched elements. (View Usage above.)

  • Returns

    • Returns: No return type

      This method does not need to return any type.

Share