Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
  <div class="price-line">
    This costs $5.00
  </div>
  
  <div class="price-line">
    Anther that costs $8.00
  </div>
  
</body>
</html>
 
span {
  font-weight: bold;
  color: blue;
}
 
$('.price-line').each(function () {
  $(this).html($(this).html().replace(/\$(\d+(\.\d\d)*)/g, '<span>$</span>'))
});
Output

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

Dismiss x
public
Bin info
MaffooBristolpro
0viewers