Lines Matching refs:element
30 Element.collectTextNodes = function(element) { argument
31 return $A($(element).childNodes).collect( function(node) {
37 Element.collectTextNodesIgnoreClass = function(element, className) { argument
38 return $A($(element).childNodes).collect( function(node) {
45 Element.setContentZoom = function(element, percent) { argument
46 element = $(element);
47 element.setStyle({fontSize: (percent/100) + 'em'});
49 return element;
52 Element.getOpacity = function(element){ argument
53 return $(element).getStyle('opacity');
56 Element.setOpacity = function(element, value){ argument
57 return $(element).setStyle({opacity:value});
60 Element.getInlineOpacity = function(element){ argument
61 return $(element).style.opacity || '';
64 Element.forceRerendering = function(element) { argument
66 element = $(element);
68 element.appendChild(n);
69 element.removeChild(n);
87 tagifyText: function(element) { argument
94 element = $(element);
95 $A(element.childNodes).each( function(child) {
98 element.insertBefore(
107 multiple: function(element, effect) { argument
109 if(((typeof element == 'object') ||
110 (typeof element == 'function')) &&
111 (element.length))
112 elements = element;
114 elements = $(element).childNodes;
122 $A(elements).each( function(element, index) { argument
123 new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
131 toggle: function(element, effect) { argument
132 element = $(element);
135 queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
137 Effect[element.visible() ?
138 Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
357 initialize: function(element) { argument
358 this.element = $(element);
359 if(!this.element) throw(Effect._elementDoesNotExistError);
361 if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout))
362 this.element.setStyle({zoom: 1});
364 from: this.element.getOpacity() || 0.0,
370 this.element.setOpacity(position);
376 initialize: function(element) { argument
377 this.element = $(element);
378 if(!this.element) throw(Effect._elementDoesNotExistError);
391 this.element.makePositioned();
392 this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
393 this.originalTop = parseFloat(this.element.getStyle('top') || '0');
401 this.element.setStyle({
409 Effect.MoveBy = function(element, toTop, toLeft) { argument
410 return new Effect.Move(element,
416 initialize: function(element, percent) { argument
417 this.element = $(element);
418 if(!this.element) throw(Effect._elementDoesNotExistError);
432 this.elementPositioning = this.element.getStyle('position');
436 this.originalStyle[k] = this.element.style[k];
439 this.originalTop = this.element.offsetTop;
440 this.originalLeft = this.element.offsetLeft;
442 var fontSize = this.element.getStyle('font-size') || '100%';
454 this.dims = [this.element.offsetHeight, this.element.offsetWidth];
456 this.dims = [this.element.scrollHeight, this.element.scrollWidth];
464 this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
468 if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
485 this.element.setStyle(d);
491 initialize: function(element) { argument
492 this.element = $(element);
493 if(!this.element) throw(Effect._elementDoesNotExistError);
499 if(this.element.getStyle('display')=='none') { this.cancel(); return; }
503 this.oldStyle.backgroundImage = this.element.getStyle('background-image');
504 this.element.setStyle({backgroundImage: 'none'});
507 this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
509 this.options.restorecolor = this.element.getStyle('background-color');
515 this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
519 this.element.setStyle(Object.extend(this.oldStyle, {
527 initialize: function(element) { argument
528 this.element = $(element);
533 var offsets = Position.cumulativeOffset(this.element);
552 Effect.Fade = function(element) { argument
553 element = $(element);
554 var oldOpacity = element.getInlineOpacity();
556 from: element.getOpacity() || 1.0,
560 effect.element.hide().setStyle({opacity: oldOpacity});
562 return new Effect.Opacity(element,options);
565 Effect.Appear = function(element) { argument
566 element = $(element);
568 from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
572 effect.element.forceRerendering();
575 effect.element.setOpacity(effect.options.from).show();
577 return new Effect.Opacity(element,options);
580 Effect.Puff = function(element) { argument
581 element = $(element);
583 opacity: element.getInlineOpacity(),
584 position: element.getStyle('position'),
585 top: element.style.top,
586 left: element.style.left,
587 width: element.style.width,
588 height: element.style.height
591 [ new Effect.Scale(element, 200,
593 new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
596 Position.absolutize(effect.effects[0].element)
599 effect.effects[0].element.hide().setStyle(oldStyle); }
604 Effect.BlindUp = function(element) { argument
605 element = $(element);
606 element.makeClipping();
607 return new Effect.Scale(element, 0,
612 effect.element.hide().undoClipping();
618 Effect.BlindDown = function(element) { argument
619 element = $(element);
620 var elementDimensions = element.getDimensions();
621 return new Effect.Scale(element, 100, Object.extend({
628 effect.element.makeClipping().setStyle({height: '0px'}).show();
631 effect.element.undoClipping();
636 Effect.SwitchOff = function(element) { argument
637 element = $(element);
638 var oldOpacity = element.getInlineOpacity();
639 return new Effect.Appear(element, Object.extend({
644 new Effect.Scale(effect.element, 1, {
648 effect.element.makePositioned().makeClipping();
651 effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
658 Effect.DropOut = function(element) { argument
659 element = $(element);
661 top: element.getStyle('top'),
662 left: element.getStyle('left'),
663 opacity: element.getInlineOpacity() };
665 [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
666 new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
670 effect.effects[0].element.makePositioned();
673 effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
678 Effect.Shake = function(element) { argument
679 element = $(element);
681 top: element.getStyle('top'),
682 left: element.getStyle('left') };
683 return new Effect.Move(element,
685 new Effect.Move(effect.element,
687 new Effect.Move(effect.element,
689 new Effect.Move(effect.element,
691 new Effect.Move(effect.element,
693 new Effect.Move(effect.element,
695 effect.element.undoPositioned().setStyle(oldStyle);
699 Effect.SlideDown = function(element) { argument
700 element = $(element).cleanWhitespace();
702 var oldInnerBottom = element.down().getStyle('bottom');
703 var elementDimensions = element.getDimensions();
704 return new Effect.Scale(element, 100, Object.extend({
711 effect.element.makePositioned();
712 effect.element.down().makePositioned();
713 if(window.opera) effect.element.setStyle({top: ''});
714 effect.element.makeClipping().setStyle({height: '0px'}).show();
717 effect.element.down().setStyle({bottom:
718 (effect.dims[0] - effect.element.clientHeight) + 'px' });
721 effect.element.undoClipping().undoPositioned();
722 effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
727 Effect.SlideUp = function(element) { argument
728 element = $(element).cleanWhitespace();
729 var oldInnerBottom = element.down().getStyle('bottom');
730 return new Effect.Scale(element, window.opera ? 0 : 1,
737 effect.element.makePositioned();
738 effect.element.down().makePositioned();
739 if(window.opera) effect.element.setStyle({top: ''});
740 effect.element.makeClipping().show();
743 effect.element.down().setStyle({bottom:
744 (effect.dims[0] - effect.element.clientHeight) + 'px' });
747 effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});
748 effect.element.down().undoPositioned();
755 Effect.Squish = function(element) { argument
756 return new Effect.Scale(element, window.opera ? 1 : 0, {
759 effect.element.makeClipping();
762 effect.element.hide().undoClipping();
767 Effect.Grow = function(element) { argument
768 element = $(element);
776 top: element.style.top,
777 left: element.style.left,
778 height: element.style.height,
779 width: element.style.width,
780 opacity: element.getInlineOpacity() };
782 var dims = element.getDimensions();
814 return new Effect.Move(element, {
819 effect.element.hide().makeClipping().makePositioned();
823 …[ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacity…
824 …new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransiti…
825 new Effect.Scale(effect.element, 100, {
830 effect.effects[0].element.setStyle({height: '0px'}).show();
833 effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
841 Effect.Shrink = function(element) { argument
842 element = $(element);
850 top: element.style.top,
851 left: element.style.left,
852 height: element.style.height,
853 width: element.style.width,
854 opacity: element.getInlineOpacity() };
856 var dims = element.getDimensions();
882 …[ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransit…
883 …new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition,…
884 … new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
887 effect.effects[0].element.makePositioned().makeClipping();
890 effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
895 Effect.Pulsate = function(element) { argument
896 element = $(element);
898 var oldOpacity = element.getInlineOpacity();
902 return new Effect.Opacity(element,
904 afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
908 Effect.Fold = function(element) { argument
909 element = $(element);
911 top: element.style.top,
912 left: element.style.left,
913 width: element.style.width,
914 height: element.style.height };
915 element.makeClipping();
916 return new Effect.Scale(element, 5, Object.extend({
920 new Effect.Scale(element, 1, {
924 effect.element.hide().undoClipping().setStyle(oldStyle);
931 initialize: function(element) { argument
932 this.element = $(element);
933 if(!this.element) throw(Effect._elementDoesNotExistError);
953 effect.element.addClassName(effect.options.style);
956 effect.element.style[transform.style.camelize()] = '';
979 … if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout))
980 this.element.setStyle({zoom: 1});
985 var originalValue = this.element.getStyle(property);
1013 this.element.setStyle(style);
1060 var element = Element.extend(document.createElement('div'));
1061 element.innerHTML = '<div style="' + this + '"></div>';
1062 var style = element.down().style, styleRules = $H();
1073 Element.morph = function(element, style) { argument
1074 new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {}));
1075 return element;
1083 Element.Methods.visualEffect = function(element, effect, options) { argument
1086 new Effect[effect_class](element, options);
1087 return $(element);