Reputation: 3
I have a slider of questions. I want only the click of a few radio input the change event is active on my slider. But if you accidentally press a keyboard button still activates the slider. is there any way to disable the keypress event change?
$($slider).change(function () { // funzione principale.
if (currentNodeNum != lastNodeNum){
cleanArray();
}
nextNode();
rightSlider();
});
Upvotes: 0
Views: 106
Reputation: 8687
You can use this code:
$('#your-checkbox-or-radio').keydown(false);
$($slider).change(function () {
if (currentNodeNum != lastNodeNum){
cleanArray();
}
nextNode();
rightSlider();
});
Upvotes: 2