From 27c6e02da8cc3d8c92c6b4aed9a92029dbc2e30c Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Wed, 1 Apr 2020 04:48:53 +0000 Subject: [PATCH] Run the truncate function after DOM is ready --- public/js/dots.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/js/dots.js b/public/js/dots.js index 24726b0..a506fa3 100644 --- a/public/js/dots.js +++ b/public/js/dots.js @@ -6,4 +6,6 @@ const truncate = () => { }); }; -truncate(); +$(() => { + truncate(); +});