We’re with you. JoomShaper is offering a 20% Discount on all plans due to the impact of COVID-19

Support Online : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Keyboard Accessibility (WCAG) for Helix 3 Menu

Featured Lock Resolved Issue
Hoping to integrate Keyboard Accessibility (WCAG) for the Helix 3. I've added the following to the top of the main.js file but am getting the error 'Unexpected string' on line 11:

jQuery('.sp-megamenu-parent > .sp-menu-item > a').on('focus', function(event){
jQuery('.sp-has-child > div').css('display'.'none');
});
jQuery('.sp-megamenu-parent > .sp-has-child > a').on('focus', function(event){
jQuery(event.target.nextSibling).css('display'.'block');
});

Thanks in advance for assistance!

10 Answers

Ofi Khan - Staff

More than a month ago #Permalink
There was a typo in the code. Please use this code.

jQuery('.sp-megamenu-parent > .sp-menu-item > a').on('focus', function(event){
jQuery('.sp-has-child > div').css('display','none');
});
jQuery('.sp-megamenu-parent > .sp-has-child > a').on('focus', function(event){
jQuery(event.target.nextSibling).css('display','block');
});


- Best regards

Ofi Khan - Staff

More than a month ago #Permalink
Hello Justin,
Thank you for your question. Please upload your JavaScript code to Custom JavaScript field in Advanced Template Options.
Screenshot_324.png

- Best regards

Attachments (1)

  • Screenshot_324.png
    Screenshot_324.png 43.3 KB

Justin

More than a month ago #Permalink
Thanks for your reply. I've removed the code from the main.js file and added it to the template's custom js area, but am still getting the same 'Unexpected String' error ... image attached for reference

Attachments (1)

  • Screen Shot 2020-03-27 at 9.32.07 AM.jpg
    Screen Shot 2020-03-27 at 9.32.07 AM.jpg 27.2 KB

Ofi Khan - Staff

More than a month ago #Permalink
Please share your site URL here or PM me. Click on my avatar and send message to PM me.

- Best regards

Justin

More than a month ago #Permalink
Please share your site URL here or PM me. Click on my avatar and send message to PM me.

- Best regards


Sure thing, the link has been sent via PM.

Thanks.

Justin

More than a month ago #Permalink
Thanks Ofi,

I've updated the code which has corrected the error, but the sub-menus are not appearing when tabbing through the primary menu items via the keyboard.

Ofi Khan - Staff

More than a month ago #Permalink
Thanks Ofi,

I've updated the code which has corrected the error, but the sub-menus are not appearing when tabbing through the primary menu items via the keyboard.


Glad to know that your issue is solved. I assume you are talking about your code not working. I apologize that this is beyond our support. Please check it by yourself or hire some professionals. Thank you for your understanding.

- Best regards

Justin

More than a month ago #Permalink
Thanks Ofi,

I've updated the code which has corrected the error, but the sub-menus are not appearing when tabbing through the primary menu items via the keyboard.


Glad to know that your issue is solved. I assume you are talking about your code not working. I apologize that this is beyond our support. Please check it by yourself or hire some professionals. Thank you for your understanding.

- Best regards


No problem Ofi, I understand ... thanks again for your help with the typo. Also, can you recommend a developer that's familiar with JoomShaper products that offers custom coding?

Thanks again.

Ofi Khan - Staff

More than a month ago #Permalink
You can search for help on our Facebook groups
1. Helix
2. SP Page Builder


There are no replies made for this post yet.
Be one of the first to reply to this post!

123

Templates

327663

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us