srikat

Untitled

Nov 19th, 2016
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. jQuery(function( $ ){
  2.  
  3. var boxClass = ['projects-counter','clients-counter','availability-counter'];
  4.  
  5. var wow = {};
  6.  
  7. $.each(boxClass, function( index, value ){
  8. // console.log("'"+value+"'");
  9. wow[value] = new WOW(
  10. {
  11. boxClass: "'"+value+"'", // animated element css class (default is wow)
  12. animateClass: 'counter counter-analog2', // animation css class (default is animated)
  13. offset: 0, // distance to the element when triggering the animation (default is 0)
  14. mobile: true, // trigger animations on mobile devices (default is true)
  15. callback: function(box) {
  16. // the callback is fired every time an animation is started
  17. // the argument that is passed in is the DOM node being animated
  18. $('.'+value).counter({});
  19. },
  20. scrollContainer: null // optional scroll container selector, otherwise use window
  21. }
  22. );
  23. });
  24.  
  25. $.each(boxClass, function( index, value ){
  26. wow[value].init();
  27. });
  28.  
  29. });
Advertisement
Add Comment
Please, Sign In to add comment