Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling jQuery UI Accordion with space bar toggling

I see in jQuery UI accordian you can use the space bar to toggle active headers. How can one disable this? I don't want the user to use keyboard to interact with the accordion.

like image 421
Ali LIshan Avatar asked Apr 01 '11 09:04

Ali LIshan


1 Answers

if you don't need the "_keydown" function at all, I guess you can just delete it.

delete($.ui.accordion.prototype._keydown);

if you want to change or override the functionality of the "_keydown" function and don't want to hack it into the original file you could do:

$.ui.accordion.prototype._keydown = function( event ) {
    // your new code for the "_keydown" function
};

hope that helps

like image 76
reiner23fx Avatar answered Oct 08 '22 20:10

reiner23fx