I'm adding the following HTML snippet to my Angular 7 app, in order to add a tooltip to an element (modified from Foundation's docs):
<span data-tooltip data-options="hover_delay: 50;"
class="has-tip" title="Tooltips are awesome">Hello</span>
But then I get the following error in Chrome's console:
core.js:15714 ERROR TypeError: elem.getAttribute is not a function
at Function.Sizzle.attr (jquery.js:1451)
at Array.<anonymous> (jquery.js:1647)
at jquery.js:2148
at superMatcher (jquery.js:2366)
at Sizzle.select (jquery.js:2536)
at Function.Sizzle [as find] (jquery.js:855)
at HTMLDocument.handlers (jquery.js:4480)
at HTMLDocument.dispatch (jquery.js:4417)
at HTMLDocument.elemData.handle (jquery.js:4121)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
Do you know what the reason can be?
I have the following imports in my index.html
:
<script src="foundation/js/vendor/modernizr.js"></script>
<script src="foundation/js/vendor/fastclick.js"></script>
<script src="foundation/js/foundation.min.js"></script>
The exact version of Foundation I am using is 5.5.1
I found the error mentioned here but that solution of adding $(document).foundation();
didn't work for me.
Thanks.