Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Preload images by creating a hidden div
- #
- # .preload {
- # position: absolute;
- # left: 1000px;
- # top: 1000px;
- # }
- def preload_images(*images)
- output = ""
- images.each do |image_path|
- output << "<div class=\"preload\" style=\"background: url(/images/#{image_path})\"></div>"
- end
- output
- end
Add Comment
Please, Sign In to add comment