Make the Alphabet enter capital if there is a space before it when entering text in the textbox
<p>I want to make the ALPHABET capitalize entered by the user in the textbox if there is a space before it.</p>

<p>Example user writes "test new" so "n" should be a capital and it will be so smooth that it feels like the user pressed the shift key</p>

<p>I think we can do the same in keydown event (jquery)</p>

<p>The code is something that i tried is:</p>

<pre><code>$('.name').live("keydown", function (e) {
  try {
    if ($('.name').val().length &gt; 1) {
      if ($('.name').val().substring($('.name').val().length - 1) == " ") {
        // HERE can we do something like e.shift key etc to get desired result
      }
    }
  } catch (err) {
    alert(err);
  }
});
</code></pre>
