The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Changing a variable outside of a function Reply To: Changing a variable outside of a function


The codepen will be blank because there is no content.

As I understand it, you have a catalog of images and you want to display some of them based on a selection from a <select> box…is that correct?

Or did you really mean “dropdown menu” which is something completely different?

So, assuming the former, which seems more likely, do you images have various tags/classes/whatever applied that JS/JQ could sort through?

If you already have gallery pages set up, then I’m guessing some sort of AJAX injection is required.