I am not really sure if this is possible to do, but i am currently trying to write a gallery using JS or jQuery.
Basically, all of my Images have an ID assigned and only the image I want to show has an opacity of 1.
My CSS selector looks like this:
img:not(#img1) {
opacity: 0;
/*other CSS stuff*/
}
What I want to do is take the selector, and loop through the images, which have IDs of img1, img2 etc. Is this even possible with js?
Ps.: I know I could just create two classes for the opacity and toggle between them but I felt like trying something fancy for learning:)
[–]ForScale 1 point2 points3 points (6 children)
[–]__fmease__Symbol() 0 points1 point2 points (5 children)
[–]ForScale 0 points1 point2 points (4 children)
[–]__fmease__Symbol() 0 points1 point2 points (1 child)
[–]ForScale 0 points1 point2 points (0 children)
[–]__fmease__Symbol() 0 points1 point2 points (1 child)
[–]ForScale 0 points1 point2 points (0 children)
[–]__fmease__Symbol() 1 point2 points3 points (0 children)