I am facing an issue with my code that is attempting to display images based on their height. Strangely, the code seems to work fine when I test it with 2 images, but fails when trying with 3 or more.
Check out the site:
Upon clicking a menu button, the images should be displayed one below the other within a width defined by a black line. When clicking the first button to create 2 thumbnails, they work as expected, but the other buttons do not function.
View the code here: http://jsfiddle.net/5qt3s/
I have stripped away any irrelevant details to simplify the code as much as possible. Any insight into what could be going wrong would be greatly appreciated. Thank you!