Reputation: 23
I am trying to use autoabbr.js from github to automatically highlight predefined words on any page and show their definition on hover. I believe I did everything right but it is not working.
I get the error: TypeError: $(...).autoabbr is not a function
Here is the codepen. https://codepen.io/amitkapoor/pen/wvKRMdg
Upvotes: -1
Views: 28
Reputation: 23
The issue was that in my project, I had this statement:
<script type="text/javascript">var jQuery_theme = jQuery.noConflict(true);</script>
As soon as I disabled it, error gone. But because I wanted this, I moved my scripts post this statement and they work now. But now, the script is working only on the hardcoded text and not dynamically generated content. It must be $ playing me again....
Thanks!
And yes, I did change jquery to JQuery later.
Upvotes: 0
Reputation: 176
Ok, this should be a simple one, your last line is:
})(jquery);
Try changing jquery
to jQuery
, with a capital-Q.
Hope that helps.
Upvotes: 0