jQuery( document ).ready( function() { jQuery(".hero_inner").fadeIn(3000); jQuery(function ($) { "use strict"; var counterUp = window.counterUp["default"]; // import counterUp from "counterup2" var $counters = $(".number_big"); /* Start counting, do this on DOM ready or with Waypoints. */ $counters.each(function (ignore, counter) { var waypoint = new Waypoint( { element: $(this), handler: function() { counterUp(counter, { duration: 4000, delay: 16 }); this.destroy(); }, offset: 'bottom-in-view', } ); }); }); });