jquery fancy box

Posted by André Alçada Padez on Stack Overflow See other posts from Stack Overflow or by André Alçada Padez
Published on 2011-02-28T23:20:26Z Indexed on 2011/02/28 23:25 UTC
Read the original article Hit count: 213

Filed under:
|

Hi, i'm using fancy box for some content editing in my backoffice. I recently added an image manager wich i create with javascript. It's kind of like a fancybox, but i had to do it from scractch for it to be able to overlay the first one. My problem is this: I want to have the user being able to press the escape key to close my manager, but if i use $(window).keypress

when i press the esc key, both the boxes close. I have tried $(window).unbind('keypress') when i start loading my box, and i have tried to look through the fancybox js file, but it is minimized.

Does anyone know how i can disable and afterwards enable the escape key (during runtime) on the fancybox?

Thanx

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-plugins