I think you have placed your CODE alright. Perhaps you need to clear browser cache to see the animation in action. In your site I can see it’s working.
Note: Although your CODE will work, it’s better to use it in the following manner if you have WordPress
4.5
or above:
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' );
function sk_enqueue_scripts() {
wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' );
wp_enqueue_script( 'wow', get_stylesheet_directory_uri() . '/js/wow.min.js', array(), '', true );
wp_add_inline_script( 'wow', 'new WOW().init();' );
}
Why?
-
The CODE is much smaller.
-
Using
wp_add_inline_script
that way guarantees that the initialization call will run just after the required external/js/wow.min.js
JavaScript file.
Related Posts:
- How do I check whether a checkbox is checked in jQuery?
- SyntaxError: Unexpected token o in JSON at position 1
- What does the function then() mean in JavaScript?
- Understanding unique keys for array children in React.js
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- Generate random number between two numbers in JavaScript
- Difference between npx and npm?
- How do I copy to the clipboard in JavaScript?
- Heroku: “No default language could be detected for this app” error thrown for node app
- Loop inside React JSX
- Can’t resolve module (not found) in React.js
- Is there a difference between /\s/g and /\s+/g?
- How to read an external local JSON file in JavaScript?
- How to call an async arrow function with await
- Get the current URL with JavaScript?
- Setting a backgroundImage With React Inline Styles
- Filter array to have unique values
- How do I chop/slice/trim off last character in string using Javascript?
- What is causing this error – “Fatal error: Unable to find local grunt”
- Escape quotes in JavaScript
- “Uncaught (in promise) undefined” error when using with=location in Facebook Graph API query
- Firebase Permission Denied
- Using Javascript in CSS
- How can I mock an ES6 module import using Jest?
- JavaScript variable assignments from tuples
- jQuery $.cookie is not a function
- Setting background-image using jQuery CSS property
- What is ESNext?
- SyntaxError: Cannot use import statement outside a module
- Appending to an object
- What is the meaning of “$” sign in JavaScript
- How to determine the installed webpack version
- Error: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node’
- How can I group data with an Angular filter?
- jQuery disable/enable submit button
- Uncaught Invariant Violation: Too many re-renders. React limits the number of renders to prevent an infinite loop
- node-request – Getting error “SSL23_GET_SERVER_HELLO:unknown protocol”
- React.js – Can’t read property of undefined
- SyntaxError: import declarations may only appear at top level of a module
- JQuery issue “TypeError: $.getJSON is not a function”
- Why is marquee deprecated and what is the best alternative?
- For loop for HTMLCollection elements
- Refresh/reload the content in Div using jquery/ajax
- How to take keyboard input in JavaScript?
- How to access Session variables and set them in javascript?
- Google Maps JS API v3 – Simple Multiple Marker Example
- HTML onchange (this.value)
- SyntaxError: Use of const in strict mode
- d3 is not defined – ReferenceError
- How can I get form data with JavaScript/jQuery?
- How do I load an HTML page in a div using JavaScript?
- How to check if a number is between two values?
- How to determine if Javascript array contains an object with an attribute that equals a given value?
- Download a file by jQuery.Ajax
- What does “export default” do in JSX?
- Strip all non-numeric characters from string in JavaScript
- Javascript – Track mouse position
- Customizer JS API
- Adding javascript to child theme
- Open media frame and select an attachment
- Loading different JS for http and https
- How to get the ToggleControl Gutenberg component working for a PHP Block
- How to append a URL parameter to all outbound URLs
- Loading Javascript Only When Specific Content Existing in a Post?
- Javascript Helpers
- wp_register_script unable to link bootstrap JS
- Should a WordPress plugin polyfill the global JS environment?
- Close TinyMCE plugin window on click away
- Running JS after theme customizer finished initialization
- Hide reply button after moveForm is called
- How to add custom javascript into from custom plugin
- remove inline scripts from the_content() produced by plugins?
- Help display image in single post using javascript zoom image..?
- Uncaught TypeError [closed]
- Checks when fetching data from multiple REST API endpoints in Gutenberg
- How to get the title of the item that is clicked on
- Correct way to include extra styles & script files?
- Correctly enqueue scripts of type=text/paperscript (PaperJs Library)
- How can I allow HTML in Gutenberg UI elements help text?
- How do I make my wordpress post appear in a mouse hover preview?
- UnitControl – Block has encountered an error
- Should I manually resolve WP Core File security issues or await a subsequent WP release?
- Uncaught TypeError: switchEditors.switchto is not a function
- Check if user can in javascript
- Rest API and how to deal with it in server side
- Is it possible to override only a part of another plugin’s / theme’s js (asset) file?
- Gutenberg – dynamically created element: how to set onChange?
- JSX SVG Icon with WordPress
- VisualComposer/WPBakery Page Editor: Is any JS event triggered after the Edition pop-in is shown?
- How do I integrate a codepen?
- Can I just insert JavaScript by using ?
- Gutenberg Edit Block Inspector Controls and save
- JavaScript and Google PageSpeed + wp_enqueue_script
- How to modify a class in load-scripts.js ?
- How to integrate a different (JavaScript) editor in WordPress?
- Trigger a function during onload
- Add Javascript/Html into a WordPress
- Passing object to FormTokenField suggestions
- How to Update a variable even if the web page reloads in js
- How do i get an Inline style in Gutenberg Block show up in front end?