使用空格键切换禁用jQuery UI Accordion [英] Disabling jQuery UI Accordion with space bar toggling
本文介绍了使用空格键切换禁用jQuery UI Accordion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在jQuery UI手风琴中看到可以使用空格键切换活动标题.如何禁用此功能?我不希望用户使用键盘与手风琴进行交互.
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.
推荐答案
如果您根本不需要"_keydown"功能,我想您可以删除它.
if you don't need the "_keydown" function at all, I guess you can just delete it.
delete($.ui.accordion.prototype._keydown);
如果要更改或覆盖"_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
};
希望有帮助
这篇关于使用空格键切换禁用jQuery UI Accordion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文