JQuery Bootstrap Toggle - Unacceptable error: syntax error, unrecognized expression: # at Function.Sizzle.error

I am using jQuery 3.3.1 and Bootstrap 3.3.7 pulled through npm.

I have the following markup for switching a div:

<div class="text-right">
     <a class="js-accordion-trigger" data-toggle="collapse" href="#advanced-search" aria-expanded="false" aria-controls="advanced-search">Advanced search <span class="js-notifier"></span></a>
</div>

<div id="advanced-search" class="js-accordion-content collapse">

</div>

However, now I get the following error in the console:

libs.js:1541 Uncaught Error: Syntax error, unrecognized expression: #
at Function.Sizzle.error (libs.js:1541)
at Sizzle.tokenize (libs.js:2193)
at Sizzle.select (libs.js:2620)
at Function.Sizzle [as find] (libs.js:845)
at jQuery.fn.init.find (libs.js:2873)
at new jQuery.fn.init (libs.js:2983)
at jQuery (libs.js:139)
at getParent (libs.js:11147)
at HTMLAnchorElement.<anonymous> (libs.js:11157)
at Function.each (libs.js:354)
+4
source share

Source: https://habr.com/ru/post/1694363/