forked from selmarosine/biokino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabout_actors_images.js
31 lines (24 loc) · 1022 Bytes
/
about_actors_images.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
document.addEventListener('DOMContentLoaded', function() {
const headers = document.querySelectorAll('.clickable-tags h2');
const infoSections = document.querySelectorAll('.hidden-info div');
headers.forEach(header => {
header.addEventListener('click', function() {
infoSections.forEach(infoSection => {
infoSection.classList.remove('active');
});
const targetClass = this.classList[0];
const targetInfo = document.querySelector(`.${targetClass}-info`);
targetInfo.classList.add('active');
});
});
document.querySelector('.about-info').classList.add('active');
});
/** FÖR ATT FÖRSTORA DE SMÅ BILDERNA **/
function toggleImageSize(clickedImage) {
const bigImagesContainer = document.querySelector('.big-images-container');
const bigImage = document.getElementById('bigImage');
if (clickedImage && clickedImage.src) {
bigImage.src = clickedImage.src;
}
bigImagesContainer.classList.toggle('active');
}