templates/layouts/scripts.html.twig line 1

  1. <!-- BACK-TO-TOP -->
  2. <a href="#top" id="back-to-top"><i class="fa fa-long-arrow-up"></i></a>
  3. <!-- JQUERY JS -->
  4. <script src="{{absolute_url(asset('build/plugins/jquery/jquery.min.js'))}}"></script>
  5. <!-- BOOTSTRAP JS -->
  6. <script src="{{absolute_url(asset('build/plugins/bootstrap/js/popper.min.js'))}}"></script>
  7. <script src="{{absolute_url(asset('build/plugins/bootstrap/js/bootstrap.min.js'))}}"></script>
  8. <!-- SIDE-MENU JS -->
  9. <script src="{{absolute_url(asset('build/plugins/sidemenu/sidemenu.js'))}}"></script>
  10. <!-- PERFECT SCROLLBAR JS-->
  11. <!-- STICKY JS -->
  12. {{ encore_entry_script_tags('js/sticky') }}
  13. <!-- THEME COLOR  JS -->
  14. {{ encore_entry_script_tags('js/themeColors') }}
  15. <!-- CUSTOM JS -->
  16. {{ encore_entry_script_tags('js/custom') }}
  17. <script>
  18.         styleDigit()
  19.         setInterval(styleDigit, 3000)
  20.         function styleDigit() {
  21.                 $('.digit').each(function() {
  22.                         $(this).text(`${$(this).text()[0] === '+' ? '+' : ''}${numberWithSpaces(Number($(this).text().replace( /\s/g, '').replace(',','.')).toFixed(2))}`);
  23.                 })
  24.         }
  25.         function numberWithSpaces(x) {
  26.                 const parts = x.toString().split(".");
  27.                 parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, " ");
  28.                 return parts.join(".");
  29.         }
  30. </script>