Menu

Trying to make a gallery with a tagging system

Reading 0:00
15s threshold

Okay I like only just started learning javascript in an attempt to make this happen so I've never really attempted it before, but what I'm trying to do is make an image gallery with buttons on the side and when you press a button it acts like a checkbox as in you can check multiple at once and the buttons are all different tags and when the button is pressed all the gallery images are hidden except for the ones tagged with whatever button was pressed.--

(I havent even attempted to add the checkbox mechinism yet because ive been preoccupied with just trying to figure out how to show and hide divs in javascript)

--My first attempt to do this was to tag each image using a class, and then with javascript select all the images with that class and then hide all other divs with the gallery-item class. i thought this would be the easiest method but I unfortunately have no idea what im doing so the script i wrote is a sad attempt to combine some different methods i found online.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.