0

I have jquery code that allow me to prompt when pressing ESC key, like this...

 $(document).ready(function(){
$(document).bind('keydown', function(e) { 
    if (e.which == 27) {
        alert('esc pressed');
    }
}); 

});

My question is that when press ESC key I want to prompt with jquery lightbox, does any one know which light box that will works when pressing ESC key!

And how do I can write that code to add any any lightbox code with above code!

AM

  • http://stackoverflow.com/questions/10820277/trigger-lightbox-with-javascript – Pedro Estrada May 30 '14 at 18:08
  • @PedroEstrada, thanks for that sample, but still some help, i got idea from there like this... [code]$(document).ready(function(){ $(document).bind('keydown', function(e) { if (e.which == 27) { $(this).wrap(''); $(this).parent('a').trigger('click'); } }); }); , but I'm trying to figure out what to write in html code to make works with jquery! please help thanks. – user3527211 May 30 '14 at 19:15
  • No problem dude. I'm proud of you. – Pedro Estrada May 30 '14 at 20:04

0 Answers0