<!DOCTYPE html>
<html>

  <head>
    <script data-require="jquery@1.11.3" data-semver="1.11.3" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="style.css" />
    <script src="script.js"></script>
    <title>Non-breaking space</title>
  </head>

  <body>
    <div id="content">
      Lorem ipsum dolor&nbsp;sit amet, consectetur&nbsp;adipisicing elit.
    </div>
    <hr />
    <pre id="log"></pre>
  </body>

</html>
$(function () {

  $.trim($('#content').text())
  .split(/ /)
  .forEach(function (v, i) {
    log('#' + i + ': ' + v);
  });

});

function log() {
  var add = Array.prototype.slice.call(arguments).join(' ');
  $('#log').text($('#log').text() + add + '\n');
}