Need help with keydown event.

Need help with keydown event.

Hi I am trying to use the jquery keydown event.

I wan to fade in a div that is a form then when the user presses keycode 17 meaning control key this div and form will fade in at the center of the screen.

here is the code I have:


  1. <html>
    <link rel=\"stylesheet\" type=\"text/css\" href=\"/home/main.css\"/>
    <script type=\"text/javascript\" src=\"http://www.domain.com/pngFix/jquery-1.3.2.min.js\"></script>
    <script type=\"text/javascript\">
    $(document).ready(function() {
    $(window).keydown(function(event){
      if (event.keyCode == '17') {
    $('#console').fadeIn(\"slow\");}
    }); 
    });
    </script>
    <center>
    <div id=\"console\">
    <br><br><br><br><br><a>Type in the Pass Phrase: </a><form><input type=\"text\" name=\"phrase\">
    </form>
    </div>
    </center>
    </html>
















This is in a php file and echoing the code. So the "\ \" ignore it  it's just saying to php that those are to be echoed as  " "

This code isn't working. I would press control key but no fade in occurs. I include this php file to all my websites webpages which are php files.

Any idea why they don't work?