if(SDB.App.exists('body:not(.fl-builder-edit) #cc-counter')){ 76 var a = 0; 77 $(window).scroll(function() { 78 79 var oTop = $('#cc-counter').offset().top - window.innerHeight; 80 if (a == 0 && $(window).scrollTop() > oTop) { 81 $('.counter-value').each(function() { 82 var $this = $(this), 83 countTo = $this.attr('data-count'); 84 $({ 85 countNum: $this.text() 86 }).animate({ 87 countNum: countTo 88 }, 89 90 { 91 92 duration: 2000, 93 easing: 'swing', 94 step: function() { 95 $this.text(Math.floor(this.countNum)); 96 },
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter