Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>JS Bin</title>
  </head>
  <body>
    <button id="addFooter">Add Footer</button>
    <div class="numbers">
      <p class="one">One</p>
      <p class="two">Two</p>
      <p class="three">Three</p>
    </div>    
    
    
    <script src="https://code.jquery.com/jquery-2.0.3.js"></script>
  </body>
</html>
 
$(() => {
 
  $('#addFooter').click(() => {
    // Add footer "after" .numbers div
    const footer = "<h2>Footer</h2>"
    $('.numbers').after(footer)
  })
})
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x