Advertisement
srikat

Untitled

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