简体   繁体   中英

jquery functions execute but log an error

When I execute the following function:

<span onclick="ldmr()">load more</span>     
<script type="text/javascript">
  function ldmr() 
  {  
    alert("hhhhhh");  
  }
</script>

I get this error:

Uncaught Error: Syntax error, unrecognized expression: #
at Function.ga.error (jquery-3.2.1.min.js:2)
at ga.tokenize (jquery-3.2.1.min.js:2)
at ga.select (jquery-3.2.1.min.js:2)
at Function.ga [as find] (jquery-3.2.1.min.js:2)
at r.fn.init.find (jquery-3.2.1.min.js:2)
at new r.fn.init (jquery-3.2.1.min.js:2)
at r (jquery-3.2.1.min.js:2)
at i (bootstrap.min.js:6)
at HTMLAnchorElement.<anonymous> (bootstrap.min.js:6)
at Function.each (jquery-3.2.1.min.js:2)

Could you please explain me what is the reason of this error? Thanks.

The bootstrap js lib i was using is depricated i just used a new version and the error gone

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM