title: Does  $(this).trigger('click') in jQuery replicate a physical mouse click?
body: <p>Would someone out there be able to help me with the following:</p>
  
  <p>I thought $(this).trigger('click') would replicate a physical click made by the user?
  Here is the code I have for triggering a click event when moving over a textarea:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function() {
      var getCursorPos = function(e){
          $(this).trigger('click');
          var $cursor_position = $(this).prop("selectionStart");
          $('#result').html('&lt;p&gt; Cursor position: ' + $cursor_position + '&lt;/p&gt;');
          console.log("Auto click at ", $cursor_position, e.pageX, e.pageY);
      };
      $("#text").bind({
          mousemove: getCursorPos,
      });
  });
  &lt;/script&gt;
  
  &lt;html&gt;
      &lt;div id="result"&gt;&lt;/div&gt;
      &lt;textarea id="text"&gt;This is some example text&lt;/textarea&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Why does it not return the cursor position from the textarea after triggering the click event.  If I physically press the mouse button, the console readout captures the cursor position.  I thought .trigger('click') would do the same. </p>
  
  <p>How would I fix this code to make it return the cursor position in the textarea as I move the mouse over the textarea?</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Martyn</p>