views:

196

answers:

1

Hello,

in jQuery-UI Slider arrow keys move the slider handle (after the handle has been selected/clicked on), which is nice, but I don't want slider to handle keyboard (I use arrow keys on the page for another purpouse).

Any ideas how to disable keyboard events for jquery-ui slider?

+1  A: 

You can unbind the keydown event from the handle to do what you want, like this:

$("#slider").slider(); //create slider
$("#slider .ui-slider-handle").unbind('keydown'); //disable keyboard actions

You can see a demo here

Nick Craver