Uncaught TypeError: $indicator.velocity is not a function
See original GitHub issueI installed the plugins using npm and bundled it using webpack. The plugin was required as following:
export default class App extends React.Component {
...
componentDidMount() {
require('materialize-css/dist/js/materialize');
}
render() {
return (
<div className='row'>
<div className='col s12'>
<ul className='tabs'>
<li className='tab col s3'><a href='#test1'>Test 1</a></li>
<li className='tab col s3'><a className='active' href='#test2'>Test 2</a></li>
<li className='tab col s3 disabled'><a href='#test3'>Disabled Tab</a></li>
<li className='tab col s3'><a href='#test4'>Test 4</a></li>
</ul>
</div>
<div id='test1' className='col s12'>Test 1</div>
<div id='test2' className='col s12'>Test 2</div>
<div id='test3' className='col s12'>Test 3</div>
<div id='test4' className='col s12'>Test 4</div>
</div>
);
}
}
I always got the Uncaught TypeError: $indicator.velocity is not a function
error when clicking on Tab . However, if I required the plugin in HTML instead, it worked just fine. I’m not quite sure what’s going wrong.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:26 (5 by maintainers)
Top Results From Across the Web
Uncaught TypeError: $(...).velocity is not a function
If you're using Velocity with jQuery, you must require jQuery before Velocity, and you must assign jQuery globally on the window object:
Read more >Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >Uncaught TypeError: Sine.easeInOut.getRatio is not a function
I have getting the following error in console. Uncaught TypeError: Sine.easeInOut.getRatio is not a function. Anyone can help please?
Read more >Fixed - Uncaught TypeError: a.replace is not a function
This does assume that newCount is a string, but this might not necessarily be the case - on initial page load this is...
Read more >Uncaught (in promise) TypeError: t[Yn] is not a function in LWC
You need to iterate over contacts.data: <template for:each={contacts.data} for:item='con'>.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Adding
doesn’t fix the velocity bug anymore on v0.97.7 👎
Guys!! Just delete the JQuery dependency in materialize folder in node_modules/materialize_css/node_modules/JQuery ! 😄
this problem is because materialize have a JQuery dependency obsolete