title: How to wrap last letter of each menu item with a span tag?
body: <p>I have a navigation menu, I want to wrap the last letter of every menu item text with a span tag, using jQuery.</p>
  
  <p>Here's my current approach, but it's not working:</p>
  
  <pre><code>$('.navbar-nav li a').each(function(i) {
  
      var menuElement = $(this).html();
  
      var menuElementLenght = menuElement.length;
  
      var lastChar = menuElement.charAt(menuElementLenght - 1);
  
      $(lastChar).wrap('&lt;span&gt;&lt;/span&gt;')
  
  });
  </code></pre>
  
  <p>I think because I'm targeting a stripped string and not an HTML element.</p>