Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Why is this script not working? WordPress

The keyboard navigation script on the following page does not work in Safari on Mac. It seems to work in everything else I test it on though, including Safari on Windows.


If you can fix it, please post the code change below :)

This is part of a new menu plugin for WordPress for improving menu accessibility. It allows you to tab onto a dropdown menu, then navigate around using the arrow keys, escape key etc. much like a menu in a Windows application.

Thanks for you time.

Answers (5)


Oleg Butuzov answers:

its working....

Oleg Butuzov comments:

sorry... my fault - its not...


Denzel Chia answers:


In your keyboard.js script,
Find all instance of $('.sf-menu a')

try changing it to


or change it to


or change it to


Depending on where you want the keyboard scripts to bind itself to li or a

Hope it helps.


Ryan Hellyer comments:

Thanks. I've implemented that change, but don't have a Mac to test on so will need to wait till someone pops online that I can ask to test it :)

Ryan Hellyer comments:

That didn't work at all unfortunately. I eventually discovered it didn't work on Mac Safari, but then later realised it didn't work on anything else either.

Do you have a working example of this you could show me?

Yours is the only usable looking solution here, the rest seem to involve replacing jQuery which is no good for a publicly released plugin.


Rashad Aliyev answers:

It's not working via IE.

If your problem still not solved then copy this jquery

[[LINK href=""]][[/LINK]]

and change with this one.

P.S: Please backup your jquery.js and if your problem still stay notify me.

best regards,

Ryan Hellyer comments:

That didn't work at all when I tried it unfortunately.

You shouldn't suggest people hack their core files like that either. You should instruct people to unhook the existing jQuery and load in a new one like Sebastian suggested below.


Sébastien | French WordpressDesigner answers:

Try to paste this code in functions.php just after <?php

function seb_init_script() {
if (!is_admin()) {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', '');
wp_enqueue_script( 'jquery' );

add_action('init', 'seb_init_script');

Ryan Hellyer comments:

That didn't work at all when I tried it unfortunately.


Rashid Aliyev answers:

Correct Query attached.

Rashid Aliyev comments:

Correct Query attached.

Pass√ľord is: please

Ryan Hellyer comments:

That didn't work at all when I tried it unfortunately.