Thanks!

Please mind that your message is probably more suited to the general  
rubyonrails spinoffs google group (general Prototype and  
script.aculo.us discussion there), as this Mailing list is for core  
Prototype development discussion (maybe borderline here).

Best and lots of fun with Prototype,
Thomas

Am 22.01.2007 um 02:18 schrieb webEater:

>
> I use a file that extends and overwrites some prototype methods.
> URL: http://aka-fotos.de/research/prototype/js/extendedPrototype0.2.js
>
> Some examples - the following ones extend Element.methods
>
> *
> visible: function(element) {
>   return Element.getStyle(element, 'display') != 'none';
> }
> For me it's better because, if an element is visible, is not
> exclusively defined by style attributes.
>
>
> *
> setOpacity: function(element, opacity) {
>       var el = $(element);
>
>       try {el.style.opacity = opacity;} catch(e) {}
>       try {el.style.MozOpacity = opacity;} catch(e) {}
>       try {el.style.filter = 'alpha(opacity='+Math.round(opacity *
> 100)+')';} catch(e) {}
>       try {el.style.KhtmlOpacity = opacity;} catch(e) {}
> }
> Useful to set cross-browser opacity, but how I see it seems to be
> implemented in prototype 1.5 stable.
>
>
> * And some extensions for show and hide, for me it's a more complex
> thing:
> hide: function(element) {
>       if (Element.visible(element)) {
>               element = $(element);
>               element._display = element.style.display;
>               element.style.display = 'none';
>       }
> },
> show: function(element) {
>       if (!Element.visible(element)) {
>               element = $(element);
>               element.style.display =
>                       typeof element._display == 'undefined' ?
>                               (element.style.display ?
>                                       '' :
>                                       Element.getDisplayType(element)) :
>                               element._display;
>       }
> },
> getDisplayType: function(element) {
>       return ['BLOCKQUOTE', 'DIV', 'FORM', 'P', 'TABLE']
>               .include(element.nodeName) ? 'block' : 'inline';
> },
> I think it's important because the display defines whether I have a
> block or an inline element. And I want to save the original  
> display, if
> it was defined by style and not by stylesheet.
>
> Prototype is very inspiring and useful for my daily work. Thank for
> this library, it's the best I can find.
>
> Andi
>
>
> >

--
Thomas Fuchs
wollzelle

http://www.wollzelle.com

questentier on AIM
madrobby on irc.freenode.net

http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to