Click here to Skip to main content
15,885,951 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more: , +
Hello,

My site has an image gallery with a row of pictures at the bottom. When I load up the page it should show image 1 in the main gallery window, but instead it's showing image in position #10 (the one to the left of #1). You can see what I'm talking about here[^]


When you load the page it's showing the White House, but it should be showing the Green House (position #1 in slider). The White House can't be seen in the slider since it's in position #10, but shows up first int the main window. Is this a javascript issue or what? All JS files can be found here[^]

Can anybody help me debug this?? I'm going nuts

Thank you
Posted
Comments
Sergey Alexandrovich Kryukov 9-Oct-14 13:22pm    
You are asking not really an expert advice, but doing some debugging work for you. This is a pretty big work. Help to debug? But how? Is it just by debugging? :-)
In this case, it would be much better if you could formulate some more particular concerns and ask your questions.
—SA
beMember 9-Oct-14 13:39pm    
I thought that one of you geniuses could simply look at the issue and realize what's wrong with the code. I feel that a position is off somewhere, like a 0 needs to be a 1 or something, but I have no clue where to look!

JS issue? CSS? Sorry for my novice-ness.
Sinisa Hajnal 10-Oct-14 2:30am    
This is how you learn :) You get a problem, you solve it. By investigating not what you think might be the problem, but complete picture from the bottom up.

If you use image gallery library, study their examples. If you wrote it yourself, check the viewport, check the initial position (maybe you just have to move it to the left (or right) by image width...

Remove the offending image. See what shows. Ascertain the order in which the images are loaded from the repository (and check your HTML too) - do not assume, check every step of the way. This is called debugging :)

It might be js issue, it might be CSS, it might even be your database order - maybe your image 10 gets loaded first for some reason.
beMember 10-Oct-14 22:18pm    
Ok, I solved it by starting from scratch and piecing it together carefully. Sometimes that's a better option than trying to sift through a haystack.

Thank you all for your advice.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900