Commit f82317de authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

cache images

parent cc2abc6d
......@@ -61,6 +61,7 @@ function parseURL(){
var index = 0;
var interval;
var imgs = [];
var images = [];
$(function(){
init();
......@@ -72,8 +73,12 @@ function init(){
for (var i=0;i<SETTINGS.n;i++){
imgs.push(SETTINGS.path+"-0"+(SETTINGS.order[i])+"-"+SETTINGS.sufx);
images[i] = new Image();
images[i].src = imgs[i];
}
//load images
index = SETTINGS.order[0];
init_rotator(document.getElementById('rotator'));
......@@ -127,7 +132,8 @@ function set_p(){
}
function seti(i,src){
rotator.src = imgs[i];
//rotator.src = imgs[i];
rotator.src = images[i].src;
if (src!="radio"){
$("#flist-"+i).click();
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment