This had been added in 2.1, which was retracted because it had too many
issues.
In the Thickbox 2.0 file, add this:
$(document).unkeyup();
$(document).keyup( function(e){ var key = e.keyCode; if(key ==
27){TB_remove()} });
after this:
$("#TB_closeWindowButton").click(TB_remove);
(that's line 108)
..and that should do it.
Standard disclaimer here. I haven't actually put this to use myself, etc.
That 27 is the escape key. You'll have to consult an ASCII chart if you
want it to be something else.
Jim Davis wrote:
> Is there a way to close a ThickBox ( http://jquery.com/demo/thickbox/
> ) without using the mouse? An access key for example? This would be a
> real plus for accessibility.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/