1

I have a wordpress website where I have setup accordions by the visual composer but at frontend accordions not working and giving this errors in console:

Uncaught Error: Syntax error, unrecognized expression: #
    at Function.fa.error (jquery.js?ver=1.12.4:2)
    at fa.tokenize (jquery.js?ver=1.12.4:2)
    at Function.fa (jquery.js?ver=1.12.4:2)
    at Function.a.find (jquery-migrate.min.js?ver=1.4.1:2)
    at a.fn.init.find (jquery.js?ver=1.12.4:2)
    at a.fn.init.a.fn.find (jquery-migrate.min.js?ver=1.4.1:2)
    at getTarget (vc-accordion.min.js?ver=5.5.5:1)
    at Accordion.getTarget (vc-accordion.min.js?ver=5.5.5:1)
    at HTMLAnchorElement.<anonymous> (vc-accordion.min.js?ver=5.5.5:1)
    at jquery.js?ver=1.12.4:2

I am unable to track down the cause of issue. I tried Switching theme, Deactivated all plugins but issue not fixed. Structure of anchor is sometning like this where I am clicking to open or close the tabs:

<a href="#1541001372509-febe2837-9c0b" data-vc-accordion="" data-vc-container=".vc_tta-container"><span class="vc_tta-title-text">Oct 30, 2018</span><i class="vc_tta-controls-icon vc_tta-controls-icon-triangle"></i></a>

Please suggest me what should I do to track down the issue, many thanks!

Rango
  • 313
  • 1
  • 4
  • 16
  • Looks like you are potentially trying to do a find with just `$('#')`. Combined with the `getTarget` reference, do you have a `data-target="#"` on anything? – Taplar Nov 07 '18 at 22:37
  • @Taplar I updated my question and pasted html. Its a inbuilt feature of visual composer. – Rango Nov 07 '18 at 22:43
  • Possibly related: https://mikado.ticksy.com/ticket/1465312/ – Taplar Nov 07 '18 at 22:45
  • Thankyou @Taplar , the above link solved my problem... Please answer on my question I will accept it. – Rango Nov 07 '18 at 22:51
  • Unfortunately I cannot post it as an answer, as it would be a link only answer. If you would explain what the issue was and how you fixed it, you can answer your own question, for future readers benefit. @Rango – Taplar Nov 07 '18 at 22:54
  • 2
    Hey @Rango the link doesn't work anymore. How did you solve this problem? – Aerodynamika Nov 22 '20 at 12:56

1 Answers1

2

I had the same problem, and I found a solution, although I do not know why it worked - I added to one of the sections of the accordion an ID, and then the accordion went back to work properly, without this error in the console. I can see that the value I gave in the ID appears in the section's href attribute, where before there was only the '#' that appeared in error.

Hope this helps you too...

Malachi Waisman
  • 482
  • 4
  • 14