I am using Jquery 3.3.1 and Bootstrap 3.3.7 pulled via npm.
I have the following markup to toggle 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 I am now getting the following error in 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)
I also encounter a similar issue, though it's not a show stopper.
it is when I created a button that would invoke a modal to show up, something like the code below.
<a href="#" id="btnMyButton" data-toggle="modal" onclick="myFunction()" data-dismiss="modal">
It looks like the cause is the following attribute:
href="#"
Replacing it with the attribute below removes shown error
href="javascript:void()"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With