-1

I got these code, which should react on mousewheel and keydown:

$('#wellcome-box').bind('mousewheel, keydown', function(event){
    console.log(event);
    if(event.which.keyCode == 40){
        alert();
    }
    else
    {
        movesTo('#slide-box-art');
        $('#onto-panel').slideDown(250);
    }
});

but all I got is a mousewheel event, but not any keydown. What I do wrong?

weird-dreams
  • 159
  • 2
  • 16

1 Answers1

0
$('#wellcome-box').on('mousewheel keydown', function(event){

You don't need the comma and on is the preferred method call.

Scott
  • 13,735
  • 20
  • 94
  • 152