title: Insert a <br /> tag after x words using jQuery
body: <p>I am trying to insert a <code>&lt;br /&gt;</code> after 5 words in a title, but the piece of code I'm using doesn't work. Please see below:</p>
  
  <pre><code>$("#post-id &gt; h2").each(function() {
      var html = $(this).html().split(" ");
      html = html[0] + "&lt;br /&gt;" + html.slice(1).join(" ");
      $(this).html(html);
  });
  </code></pre>
  
  <p>This function works well as it is - if you want to add a <code>&lt;br /&gt;</code> tage after the <strong>first</strong> word. But if I change it to <code>html.slice(5)</code> then it doesn't work properly.</p>
  
  <p>How could I fix this so it works fine after 5 words? Or maybe a different approach would be more appropriate? Thanks for your help in advance!</p>