title: Get position of the cursor in the <input>
body: <p>I tried looking at many stackoverflow discussions on how to get cursor position on a click on an input box (but many dealt with getting highlighted position using caret instead) - but nothing seems to be working for my very simple requirement.</p>
  
  <p>All I want is a function which, when a mouse is clicked on an  will return the position of cursor (in terms of character count from beginning) - please note that by position I mean the character position.</p>
  
  <p><em>when you click somewhere on an editable input box with some text on it, I want to get the position (in terms of character count from beginning) of cursor after this click - so that I could remember this for a future click(for some specific UI requirement). –</em></p>
  
  <p>Is there a jQuery (or javascript) function that would do? Any workarounds are welcome too.</p>
  
  <p>Thanks</p>
  
  <p>EDIT-
  some people are directing me to other posts - but please note that I could not use jQuery Caret or any other plug-in.  All I got is jQuery.</p>