i am trying to create a javascript slideshow gallery, i am having a problem with the effect2() and goTo() functions, which should display the animation of the sliding image, for some reason i am getting a white background when clicking the foTo() button, any suggestion how to fix it so the second image will be displayed there

Edit fiddle - JSFiddle