I’m creating a more accessible version of jQuery UI slider with number keys assigned to events that move the slider to different positions. I would like the user to be able to use both sets of numbers on a keyboard.
Example “49” and “97” for the number 1.
Here is the code I’m using:
if(event.keyCode == "49")
{
$("#slider_feedback").html(mod3["rc" + clip + "_1"]);
$("#slider_feedback").show();
$(".ui-slider-handle").css("left", "0%");
}
Any suggestions?
Why you don’t just put both conditions in IF statement but with OR operator:
See a list of Java script OPERATORS and study it a little bit (JavaScript Assignment Operators are directly connected to this question):
http://www.w3schools.com/js/js_operators.asp