8 lines
257 B
JavaScript
8 lines
257 B
JavaScript
const $ = (id) => document.getElementById(id);
|
|
$("title-img").src = `images/ted${Math.ceil(Math.random() * 3)}.jpg`;
|
|
document.querySelectorAll("img.media").forEach((item) => {
|
|
item.addEventListener("click", () => {
|
|
item.requestFullscreen();
|
|
});
|
|
});
|