remove jquery all together

This commit is contained in:
Aaron Qian 2023-01-04 18:12:39 -08:00
parent b0f5b0b059
commit 8580a1f463
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
61 changed files with 4113 additions and 684 deletions

View file

@ -1,16 +1,16 @@
import {init} from 'ityped';
import { init } from 'ityped'
// =========== Typing Carousel ================
// get data from hidden ul and set as typing data
document.addEventListener('DOMContentLoaded', () => {
$ul = document.getElementById('typing-carousel-data')?.children;
if($ul == null || $ul.length === 0) return;
const $ul = document.getElementById('typing-carousel-data')?.children
if ($ul == null || $ul.length === 0) return
const strings = Array.from($ul).map($el => $el.textContent);
const strings = Array.from($ul).map($el => $el.textContent)
init('#ityped', {
strings,
startDelay: 200,
loop: true
});
});
})
})