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="convertAllWords">Convert All Words to Spanish</button>
    
    
    <p class="one">One</p>
    <p class="two">Two</p>
    <p class="three">Three</p>
    
    
    <script src="https://code.jquery.com/jquery-2.0.3.js"></script>
  </body>
</html>
 
$(() => {
 
  $('#convertAllWords').click(() => {
    // set text for all p elements to spanish translation
    $(".one").text("uno")
    $(".two").text("dos")
    $(".three").text("tres")
  })
})
Output

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

Dismiss x