Hi, I'm trying to make a website which uses several iframes completely keyboard friendly. The problem I'm having at the moment is I can't seem to be able to blur the iframes and focus on an element within the parent document without clicking the mouse.

Here's what I've got at the moment, which does trigger the parent document's function, it even blurs the iframe and clicks on the intro section like it should but isn't focusing on the parent document (i know because i put blur and focus event listeners on the two elements with an alert function), and after that it doesn't respond to key presses without clicking the mouse first. i've already tried focus instead of click but, obviously, still no cigar.

Iframe script:
Code:
$(document).bind('keydown', function(event) {
switch(event.which) {
case 27: { // esc key pressed
parent.$(parent.document).trigger('pageFocus');
}
}
});
Parent script:
Code:
$(document).bind('pageFocus', function(event){
$(creativePage).trigger('blur'); $('#intro').trigger('click');
});
Am I missing something completely simple here? Any help you can give is much appreciated in advance.