Velocity with plain javascript does not operate if jQuery library is included
See original GitHub issueWhen using plain javascript velocity operates fine with the code below, but when including the jQuery library the following code no longer works and the console logs Uncaught ReferenceError: Velocity is not defined
According to the documentation this should work with or without jQuery.
This limits us… this means we cannot mix and match javascript with jQuery and velocity.
See this fiddle: http://jsfiddle.net/1d200vh4/7/
var box = document.querySelector('.box');
Velocity(box, { scale: 2 }, { easing: "linear", duration: 500, loop: true });
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
What may be the cause of the error "ReferenceError: Velocity ...
The velocity library reference should have been BEFORE the jQuery reference. The way you know this is that when you run the code,...
Read more >Make Your Website Interactive and Fun with Velocity.js (No ...
Maria Antonietta Perna introduces Velocity JS, a super featured JavaScript library for DOM animation, and shows how to use it without jQuery ......
Read more >Velocity.js
Overview. Velocity is an animation engine with the same API as jQuery's $.animate(). It works with and without jQuery. It's incredibly fast, and...
Read more >5 Easy Ways to Fix the "jQuery is Not Defined" Error - Kinsta
The "jQuery is not defined" error means a call for a specific jQuery that wasn't available when the website loaded. Here's how to...
Read more >jQuery API Documentation
jQuery is a fast, small, and feature-rich JavaScript library. ... all elements that are in the progress of an animation at the time...
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 FreeTop 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
Top GitHub Comments
See #722 for how to bypass this.
Thanks for the help adjusted your code to the following,
if (window.jQuery) { var V = $.Velocity; } else { var V = Velocity; }