CODE (javascript):
скопировать код в буфер обмена
скопировать код в буфер обмена
- this.start = function(){
- func = this[func];
- timer = setInterval(function(){
- func();
- } ,interval);
- };
- this.openBlock = function(){
- if(width < setWidth){
- width += this.stepW;
- }else{
- width = setWidth;
- }
- if(height < setHeight){
- height += this.stepH;
- }else{
- height = setHeight;
- }
- if(opacity <= 1){
- opacity += this.stepO;
- }
- element.style.width = width+"px";
- element.style.height = height+"px";
- element.style.opacity = opacity;
- if(width >= setWidth && height >= setHeight && opacity >= 1){
- clearInterval(timer);
- if(addToEndInterval)
- addToEndInterval();
- }
- }.bind(this);