mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
countup added
This commit is contained in:
15
js/tabler.js
15
js/tabler.js
@@ -1,3 +1,5 @@
|
||||
import { CountUp } from "countup.js";
|
||||
|
||||
const tabler = {
|
||||
hexToRgbA: function(hex, opacity) {
|
||||
let c;
|
||||
@@ -59,6 +61,19 @@ $(document).ready(function() {
|
||||
// $('[data-toggle="tooltip"]').tooltip();
|
||||
// $('[data-toggle="popover"]').popover();
|
||||
|
||||
/*
|
||||
CountUp
|
||||
*/
|
||||
let countups = document.querySelectorAll("[data-countup]");
|
||||
for(let i = 0;i<countups.length;i++){
|
||||
let dataCountUp;
|
||||
if(countups[i].getAttribute("data-countup") != ''){
|
||||
dataCountUp = JSON.parse(countups[i].getAttribute("data-countup"));
|
||||
}
|
||||
let countup = new CountUp(countups[i],parseFloat(countups[i].innerText),dataCountUp);
|
||||
countup.start();
|
||||
}
|
||||
|
||||
/*
|
||||
Imask plugin
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user