CYCLE PLUGIN - triggering function on specific slide with keyboard shortcut

CYCLE PLUGIN - triggering function on specific slide with keyboard shortcut


Hello

i have some spans that are displayed by cycle plugin

<span class="ban">a</span>
<span class="ban">b</span>
<span class="ban">c</span>

etc

i use the function to modify currently displayed slide on mouse click

  1. <script>
  2. function selecta(){

  3.      $("span").click(function () {
  4.      $(this)  .toggleClass("dunno");
  5.      $(this) .clone() .appendTo("#buffer");
  6.     });
  7.  
  8. };
  9. </script>


I would like to do it with keyboard rather than mouse.
But then I have  problem with triggering
function only in the currently displayed slide

I tried this for ENTER key but failed:
  1. function selecta() {

  2. $('span').bind('keydown', function(e) {
  3.       if(e.keyCode==13)
  4.      $(this)  .toggleClass("dunno");
  5.      $(this) .clone() .appendTo("#buffer");
  6.        
  7.  });

  8. }

Thanks in advance for the suggestions.