title: Manually triggering a jQuery click event from within another object's click event
body: <p>I'm working on a little web app where clicking on one div (call it element "A") needs to change the position of itself and another div (call it element "B"), and vice versa.</p>
  
  <p>The functionality would go something like this:</p>
  
  <pre><code>Click 'A' {
    A is moved some number of pixels closer to the mouse position (making use of jQuery's .pageX and .pageY event object properties)
    B's click event is manually triggered, moving it some number of pixels closer to the mouse
  }
  </code></pre>
  
  <p>I figured I would just bind click event handlers to both A &amp; B. If A were clicked I would manually trigger B's click event (using jQuery's .trigger(), and vice versa. Unfortunately manually triggering the click event for one object from within the other object's handler isn't working for me--e.g. in the example above, I can't retrieve pageX and pageY properties when triggering div B's click event.</p>
  
  <p>I've included an example to illustrate this point here: <a href="http://jsfiddle.net/tZFNk/2/" rel="nofollow">http://jsfiddle.net/tZFNk/2/</a>.</p>
  
  <p>Cheers and thanks in advance for your help.</p>