Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

TashaDobie

Circle Member
  • Content Count

    17
  • Joined

  • Last visited

  • Days Won

    1

TashaDobie last won the day on May 29 2018

TashaDobie had the most liked content!

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes this works perfectly! Thank you so much for your help! I really appreciate it.
  2. I am really new to code and am not sure how to do this? Would it be possible for you to help me please?
  3. @paul2009 This is the exact code that I have: However, I need to edit it to make it update automatically with each passing day. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> var a = 0; $(window).scroll(function() { var oTop = $('#counter').offset().top - window.innerHeight; if (a == 0 && $(window).scrollTop() > oTop) { $('.counter-value').each(function() { var $this = $(this), countTo = $this.attr('data-count'); $({ countNum: $this.text() }).animate({ countNum: countTo }, { duration: 2000, easing: 'swing', step: function() { $this.text(Math.floor(this.countNum)); }, complete: function() { $this.text(this.countNum); } }); }); a = 1; } }); </script> <div id="counter"> <div class="sqs-col sqs-col-4 counter-value" data-count="200" data-desc=" tonnes of co2 pollution saved">0</div> <div class="sqs-col sqs-col-4 counter-value" data-count="700000" data-desc="less bottles polluting our planet">0</div> <div class="sqs-col sqs-col-4 counter-value" data-count="3567052" data-desc="litres of iXi Water sold">0</div> </div> <style> .counter-value { font-size: 50px; line-height:1.4em; text-align:center; padding:18px 0; } .counter-value:after { content: attr(data-desc); display:block; text-transform:uppercase; font-size: 20px; line-height:1.3em; } </style>
  4. Hi There, I am new to html and would love some help to update my counter data value automatically with every passing day. <div id="counter"> <div class="sqs-col sqs-col-4 counter-value" data-count="200" data-desc=" tonnes of co2 pollution saved">0</div> <div class="sqs-col sqs-col-4 counter-value" data-count="700000" data-desc="less bottles polluting our planet">0</div> <div class="sqs-col sqs-col-4 counter-value" data-count="3567052" data-desc="litres of iXi Water sold">0</div> </div>
×
×
  • Create New...