.keydown is breaking accordion() - why?

So the ‘ctrl+f’ keydown works beautifully, but the ‘esc’ keydown is breaking the accordion. Any ideas why?

Thanks for your help!


            <script  type ="text/javascript" >
              $(document).ready(function() {
                $("#resume-trd").accordion();
              });

            /* capture ctrl+f and open all accordion */
            $(document).keydown(function(e){
                if ((e.keyCode == 70) && (e.ctrlKey == true)) {
                    $('#resume-trd .ui-accordion-content').slideDown();
                }
            });
            /* capture esc */
            $(document).keydown(function(e){
                if (e.keyCode == 27) {
                    $('#resume-trd .ui-accordion-content').slideUp();
                }
            });
            </script>

Where are you getting the “accordion” function? Can you post a more complete fiddle, that includes all the relevant HTML, CSS, and JS?

Thanks for the reply, I think i’m going to go another direction with the whole project. Thanks!