Fix counters on BFOR page
goin old-school
diff --git a/bfor.html b/bfor.html
index eca56f1..d0c0b7d 100644
--- a/bfor.html
+++ b/bfor.html
@@ -2115,19 +2115,19 @@
<div class="layout">
<h2 class="text-center" style="color: #fff;">2017 Revenue (year one)</h2>
<div class="grid-3">
- <span class="count1 counter text-dark" style="color: #0080ff;">899.00</span>
+ <span class="count1 counter text-dark" style="color: #0080ff;" data-count="889">0</span>
<p>Contributions, Grants, Gifts</p>
</div> <!-- /.col-sm-3 -->
<div class="grid-3">
- <span class="count2 counter text-dark" style="color: #0080ff;">0</span>
+ <span class="count2 text-dark" style="color: #0080ff;" >0</span>
<p>Program Services</p>
</div><!-- /.col-sm-3 -->
<div class="grid-3">
- <span class="counter text-dark" style="color: #0080ff;">0</span>
+ <span class="text-dark" style="color: #0080ff;" >0</span>
<p>Special Events</p>
</div><!-- /.col-sm-3 -->
<div class="grid-3">
- <span class="counter count4 text-dark" style="color: #0080ff;">0</span>
+ <span class="count4 text-dark" style="color: #0080ff;" >0</span>
<p>Other Revenue</p>
</div><!-- /.col-sm-3 -->
</div>
@@ -2136,19 +2136,19 @@
<div class="layout">
<h2 class="text-center" style="color: #fff;">2017 Expenses (year one)</h2>
<div class="grid-3">
- <span class="count1 counter text-dark" style="color: #0080ff;">0</span>
+ <span class="count1 text-dark" style="color: #0080ff;" >0</span>
<p>Program Services & Affiliates</p>
</div> <!-- /.col-sm-3 -->
<div class="grid-3">
- <span class="count2 counter text-dark" style="color: #0080ff;">360.00</span>
+ <span class="counter count2 text-dark" style="color: #0080ff;" data-count="360">0</span>
<p>Administration</p>
</div><!-- /.col-sm-3 -->
<div class="grid-3">
- <span class="counter text-dark" style="color: #0080ff;">0</span>
+ <span class="text-dark" style="color: #0080ff;" >0</span>
<p>Fundraising</p>
</div><!-- /.col-sm-3 -->
<div class="grid-3">
- <span class="counter count4 text-dark" style="color: #0080ff;">295.00</span>
+ <span class="counter count4 text-dark" style="color: #0080ff;" data-count="295">0</span>
<p>Other Expenses</p>
</div><!-- /.col-sm-3 -->
</div>
@@ -2380,7 +2380,7 @@
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- Script: Smooth scrolling between anchors in the same page -->
<script src="js/smooth-scroll.js"></script>
- <script src="https://bfintal.github.io/Counter-Up/jquery.counterup.min.js"></script>
+ <!-- <script src="https://bfintal.github.io/Counter-Up/jquery.counterup.min.js"></script> -->
<script src="js/counter.js"></script>
</body>
diff --git a/js/counter.js b/js/counter.js
index f632111..38d2ae0 100644
--- a/js/counter.js
+++ b/js/counter.js
@@ -1,3 +1,28 @@
- $('.counter').counterUp({
+/* $('.counter').counterUp({
- });
\ No newline at end of file
+ }); */
+$('.counter').each(function() {
+ var $this = $(this),
+ countTo = $this.attr('data-count');
+
+ $({ countNum: $this.text()}).animate({
+ countNum: countTo
+ },
+
+ {
+
+ duration: 3000,
+ easing:'linear',
+ step: function() {
+ $this.text(Math.floor(this.countNum));
+ },
+ complete: function() {
+ $this.text(this.countNum);
+ //alert('finished');
+ }
+
+ });
+
+
+
+});
\ No newline at end of file