1. Helix3
  2. Friday, 27 March 2020
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!
Accepted Answer
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
  1. more than a month ago
  2. Helix3
  3. # Permalink
Responses (9)
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)
  1. more than a month ago
  2. Helix3
  3. # 1
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)
  1. more than a month ago
  2. Helix3
  3. # 2
Please share your site URL here or PM me. Click on my avatar and send message to PM me.

- Best regards
  1. more than a month ago
  2. Helix3
  3. # 3
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.
  1. more than a month ago
  2. Helix3
  3. # 4
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.
  1. more than a month ago
  2. Helix3
  3. # 5
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
  1. more than a month ago
  2. Helix3
  3. # 6
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.
  1. more than a month ago
  2. Helix3
  3. # 7
You can search for help on our Facebook groups
1. Helix
2. SP Page Builder
  1. more than a month ago
  2. Helix3
  3. # 8


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


This forum is archived

This forum has been archived. Please use JoomShaper official support system.