Is there a way of simulating a mouseclick in a div from a keypress?

Is there a way of simulating a mouseclick in a div from a keypress?

Short, quick version: Is there a way of simulating a mouseclick in a div from a keypress?

In other words, if I press 2, I want it to simulate me actually having clicked in the div
<div id="jplayer_next2"><a href="#">next</div>


Long version (for anyone wondering "WHY?")


Using the jplayer jquery plugin:

For some reason (and after 2 days I've given up trying to find out) I can't seem to directly call the function which is defined right there on the page:

  1. function playListNext() {
  2.       var index = (playItem+1 < myPlayList.length) ? playItem+1 : 0;
  3.       if( index > 0 ) {
  4.             playListChange( index );
  5. }
I've tried $("#jquery_jplayer").jPlayer("playListNext"); and playListNext() and playListNext; - about 50 different variants through the night!

So I've settled for copying the div it is defined in:

As it appears that once you've clicked one element, you can't click 
the same named element further down, to get the tabindex keypresses 
going, I've done the following: 


        $("#jplayer_previous").click( function() { 
                playListPrev(); 
                return false; 
        }); 



        $("#jplayer_next").click( function() { 
                playListNext(); 
                return false; 
        }); 



        $("#jplayer_previous2").click( function() { 
                playListPrev(); 
                return false; 
        }); 



        $("#jplayer_next2").click( function() { 
                playListNext(); 
                return false; 
        }); 



So now, I have the player further down the page, and at the top, I 
have 
<div id="jplayer_previous2" ><a href="#">previous</a></div> 
<div id="jplayer_next2"><a href="#">next</div> 



All good so far for clickable links BUT... there MUST be a way of 
simulating a mouse click in a div, so I can carry on with the 
accesskeys (the only thing holding up going live). 


I've had my head buried in various docs about jquery "click" and 
javascript "onclick" etc, but nothing seems to suit.  So what I need 
is a function that will simulate having clicked in<div 
id="jplayer_next2"><a href="#">next</div>, which then calls 
playListNext()



They keypress code (works fine for 1 and 2)

  1.    $(document).keypress(function(evt)
  2.          {
  3.                 var keyCode = 0;
  4.                 if (evt)
  5.                 {
  6.                         keyCode = evt.keyCode || evt.which;
  7.                 }
  8.                 else
  9.                 {
  10.                         // For IE
  11.                         keyCode = window.event.keyCode;
  12.                 }
  13.                 switch (keyCode)
  14.                 {
  15.                         case 49 : $("#jquery_jplayer").jPlayer("play");break;   //1
  16.                         case 50 : $("#jquery_jplayer").jPlayer("pause");break; //2
  17.                         case 51 : $("#jquery_jplayer").playListNext;break;  //3
  18.                                        
  19.                 }
  20.       });
So as line 17 in the above code doesn't work, how am I going to get it to do something like:

case 51 : <simulate a click on #jplayer_next2>;break;

Any ideas are hugely appreciated - this has been a long few nights and many grey hairs!