I’m using periodic_remote_call and it updates a div with pictures.
How Can I get these pictures to be preloaded?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I do not know hwether you still need the information, but you can indeed make a dynamic piece of JavaScript containing the ids, which you can use for your preload. Your View would contain something like this (assuming that
@photo_idsis the Ruby array):Now you can loop your
photos_idin JavaScript to preload the images.