A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/59178594/cannot-read-property-velocity-of-undefined below:

jquery - Cannot read property 'Velocity' of undefined

I've a a problem, on wordpress, on use Velocity js.

Inside function.php i've enqueued the velocity.min.js and velocity.ui.min.js, like this

wp_enqueue_script('velociti-min-js', STYLESHEET_URI . '/assets/js/velocity.min.js', array('jquery'), THEME_VERSION, true);
wp_enqueue_script('velociti-ui-min-js', STYLESHEET_URI . '/assets/js/velocity.ui.min.js', array('jquery'), THEME_VERSION, true);

Then i've enqueued the main.js file with my custom javascript code like this

wp_enqueue_script('main-theme-function', STYLESHEET_URI . '/assets/js/main-theme-function.js', NULL, THEME_VERSION, TRUE);

When i try to register a new Velocity effect, like

$.Velocity
.RegisterEffect("myeffect", {
    defaultDuration: 1,
    calls: [ 
        [ { translateY: '-50%'}, 1]
    ]
});

I get this error on console

Uncaught TypeError: Cannot read property 'Velocity' of undefined

But I can't understand why... can someone help?

Thanks a lot


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4