Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There isn't a fixed 500ms loading time. It advances slides by changing the background image of the central "pic" element. This is the JS to advance the slide:

   function increment(){
    if(imgNum < 141){
      imgNum++;
    }else{
      imgNum = 1;
    }       
    url = "url('img/vrg_google_doc_final_vrs03-"+imgNum+".jpg')";

    document.getElementById('pic').style.backgroundImage=url;
  }
  
The reason you see a flicker is because it takes time to load the next image, and until it loads you're going to see the black background. As you mentioned, the preloading images would solve this.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: