more bites
This commit is contained in:
parent
3e3ffe345e
commit
350ef97df4
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
BIN
example/pub/img/bite2.png
Normal file
BIN
example/pub/img/bite2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
|
|
@ -2,6 +2,8 @@ export function initBurger() {
|
||||||
document.addEventListener('click', ev => {
|
document.addEventListener('click', ev => {
|
||||||
const el = (ev?.target as HTMLElement).closest('.burger') as HTMLImageElement
|
const el = (ev?.target as HTMLElement).closest('.burger') as HTMLImageElement
|
||||||
|
|
||||||
if (el) el.src = '/img/bite.png'
|
if (!el) return
|
||||||
|
|
||||||
|
el.src = el.src.endsWith('/img/burger.png') ? '/img/bite1.png' : '/img/bite2.png'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user