| u[Master] | Отредактировал u[Master] - Пятница, 08 Января 2010, 12:32 Дата: 08 Января 2010, 12:30 | Сообщение # 1 | ● ● ● ● ● 103 сообщения Статус: Offline | Нашел у себя старый скрипт, но не понимаю что он делает.Подскажите пожалуйста Quote <script type="text/javascript"> Cufon.now();animate={animtypes:'smooth',animator:[],ie:/*@cc_on!@*/false,animtype:function(b){switch(this.animtypes){case'simple':return b;break;case'compress':var c=2;return Math.pow(b,2)*((c+1)*b-c);break;case'smooth':function h(e){return Math.pow(e,3)};if(b<0.5){return h(2*b)/2}else{return(2-h(2*(1-b)))/2};break;case'jump':function g(e){for(var a=0,f=1;1;a+=f,f/=2){if(e>=(7-4*a)/11)return-Math.pow((11-6*a-11*e)/4,2)+Math.pow(f,2)}};return 1-g(1-b);break;default:return b;break}},slide:function(d,i,k,j){for(key in i){l(key,i[key])}function l(b,c){var h,g;h=d+b;switch(b){case'opacity':if(animate.ie){g=d.style.filter?parseFloat(d.style.filter.match(/[0-9]+/)):100}else{g=d.style.opacity?parseFloat(d.style.opacity):1;c=c/100};break;case'marginLeft':g=parseInt(d.style.marginLeft?d.style.marginLeft:0);break;case'marginRight':g=parseInt(d.style.marginRight?d.style.marginRight:0);break;default:g=0;break}if(h in animate.animator){clearInterval(animate.animator[h].timer)}animate.animator[h]={start:new Date().getTime(),timer:setInterval(function(){var e=(new Date().getTime())-animate.animator[h].start;var a=e/k;if(b=='opacity'){var f=(c-g)*a+g;if(animate.ie){d.style.filter="alpha(opacity="+f+")"}else{d.style.opacity=f}}else{var f=(c-g)*animate.animtype(a)+g;d.style[b]=f+"px"}if(a>=1){clearInterval(animate.animator[h].timer);if(b=='opacity'){if(animate.ie){d.style.filter="alpha(opacity="+c+")"}else{d.style.opacity=c}}else{d.style[b]=c+"px"}if(j){j()}}},10)}}},anim:true,divs:'',scrolprepare:function(){var e=document.getElementById('sitewrap').getElementsByTagName('div');animate.divs=e;if(animate.divs.length<5){animate.anim=false}for(var a=0;a<e.length;a++){e[a].style.margin=0;if(a>3){e[a].style.filter="alpha(opacity='0')";e[a].style.opacity=0}}},scrol:function(e){if(animate.anim){animate.anim=false;var a=400;switch(e){case'left':var f=animate.divs[0];var b=animate.divs[4];animate.slide(f,{"opacity":0,"marginLeft":-240},a,function(){animate.slide(b,{"opacity":100},a,function(){animate.anim=true;animate.scrolprepare()});document.getElementById('sitewrap').appendChild(f)});break;case'right':var f=animate.divs[3];var b=animate.divs[0];var c=animate.divs[animate.divs.length-1];document.getElementById('sitewrap').insertBefore(c,b);c.style.marginLeft=-240+'px';animate.slide(f,{"opacity":0,"marginRight":-240},a);animate.slide(c,{"marginLeft":0},a,function(){animate.slide(c,{"opacity":100},a,function(){animate.anim=true;animate.scrolprepare()})});break;default:alert('Не указано направление!');break}}}};animate.scrolprepare(); </script> [ Сообщение от пользователя с низкой репутацией. Показать ] | | |
|
| Бармалей | Дата: 08 Января 2010, 12:47 | Сообщение # 2 | ● ● ● ● ● Тиран 7772 сообщения Статус: Offline |
 | | |
|
| -NikS- | Дата: 08 Января 2010, 12:48 | Сообщение # 3 | ● ● ● ● ● 103 сообщения Статус: Offline | но не понимаю что он делает Значит не нужен. Фтопку | | |
|
| u[Master] | Дата: 08 Января 2010, 12:58 | Сообщение # 4 | ● ● ● ● ● 103 сообщения Статус: Offline | -NikS-, нет Бармалей, спасибо, понял. Он обращает у меня теги h1 & h2 в изображения [ Сообщение от пользователя с низкой репутацией. Показать ] | | |
|