gjeez ;)
function tbClose(ev) {
if (ev.which == 27) { .. action .. };
}
Just before you open TB:
jQuery(document).keypress(tbClose);
Just after you close TB:
jQuery(document).unkeypress(tbClose);
You could have figured that out ;)
yeah but i want to bind this event only when the window is open, so if user
press esc in the side it will not disable this key when no need to
got me?
Gilles (Webunity) wrote:
>
>
> jQuery(document).keypress(function(ev) {
> if (ev.which == 27) { .. action .. };
> });
>
> Which = jQuery a
jQuery(document).keypress(function(ev) {
if (ev.which == 27) { .. action .. };
});
Which = jQuery assigned crossbrowser keycode.
3 matches
Mail list logo