i have some code that tries to list images based on their height. the weird thing is that the same code kinda works when i try with 2 images but doesn’t work when i try with 3 or more
site: http://bit.ly/JV5I0Z
if you click on a menu button, the images should list themselves one below the other filling a width as wide as that black line thingy. if you click the 1st button that creates 2 thumbnails they work but the other buttons dont do nothing
code: http://jsfiddle.net/5qt3s/
i have tried to remove all irrelevant stuff to keep it as simple as possible
what could i be doing wrong? thanks
You only have two small images on your webspace (euroscala.balkanium.com):
images/shkalla/small/3.jpgdoesn’t exist so when it gets to this image (in the loop insidecreateThumbs) instead of firing theimg.onloadevent it firesimg.onerror, because it fails to load the image. This means yourtotalLoadedcount never reachestotalThumbsandredrawThumbsdoesn’t get called.Either create the missing images, or hook into the
img.onerrorevent and skip the image.