[Rails-spinoffs] Re: element.hide not being defined.

2007-09-26 Thread Alex Duffield
I use lightWindow http://www.stickmanlabs.com/lightwindow/ Its based on prototype and scriptaculous __ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com On 26-Sep-07, at 7:40 AM, k_443

[Rails-spinoffs] Re: element.hide not working

2007-08-12 Thread Tom Gregory
Close, but the other way around. Inline styles have a higher priority than styles defined in a CSS block (either in page head or external file). Element.hide() adds display:none to the element, hiding it, no matter what its class/style rules might otherwise dictate. Element.show() removes

[Rails-spinoffs] Re: element.hide not working

2007-08-12 Thread Gareth Evans
Oops, For some reason I thought that show applied a style. I stand humbly corrected. Either way, my initial statement was correct :) Gareth On 8/13/07, Tom Gregory [EMAIL PROTECTED] wrote: Close, but the other way around. Inline styles have a higher priority than styles defined in a CSS

[Rails-spinoffs] Re: element.hide not working

2007-08-11 Thread Gareth Evans
its to do with how the various styles are prioritised. CSS (external files) have a higher priority than inline styles, and the Show() method, uses inline style, so nothing happens. You should use inline style on your element if you are planning on unhiding it. *Or* load the page with the element

[Rails-spinoffs] Re: Element.hide() Doesn't Hide Descendents?

2007-07-12 Thread Matt
I've run into this problem myself where I thought the P tag would be containing other elements. I found out what was going on by looking at the DOM Inspector in Firefox which displayed the element orientation as it had rendered it, not how I had written it. On Jul 12, 9:12 am, Rob Wilkerson

[Rails-spinoffs] Re: Element.hide() Doesn't Hide Descendents?

2007-07-12 Thread Rob Wilkerson
Ah, good idea. I was using firebug, but it used my written code. On 7/12/07, Matt [EMAIL PROTECTED] wrote: I've run into this problem myself where I thought the P tag would be containing other elements. I found out what was going on by looking at the DOM Inspector in Firefox which

[Rails-spinoffs] Re: Element.hide

2006-12-06 Thread Marius Feraru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Fuchs wrote: function hideElements(){ $A(arguments).each(Element.hide); } Ugly :)) Let's not forget that $() accepts multiple arguments: $('e1', 'e2', 'e3').each(Element.hide); $$() could also be used for that _when_ it will be able

[Rails-spinoffs] Re: Element.hide

2006-12-06 Thread Michael Peters
Marius Feraru wrote: Currently, my preferred way to doing things like this is: $(qw('e1 e2 e3')).invoke('hide'); (qw is like Perl's string to array sweetener) Sweet! Is Prototype getting qw() ? I was wishing I had that just a few hours ago :) -- Michael Peters Developer Plus Three,

[Rails-spinoffs] Re: Element.hide Element.show giving me trouble

2006-12-06 Thread collideous
How about? Script: function view (obj) { ['basicinfo','canbackground','canposition','canskill'].without(obj).each(Element.hide); Element.show(obj); } And: ul id=tabnav li class=tab1a href=# onclick=view('basicinfo')Basic Info/a/li li class=tab2a href=#

[Rails-spinoffs] Re: Element.hide

2006-12-06 Thread Christophe Porteneuve
Michael Peters a écrit : Sweet! Is Prototype getting qw() ? I was wishing I had that just a few hours ago :) It has $w now :-) -- Christophe Porteneuve a.k.a. TDD [They] did not know it was impossible, so they did it. --Mark Twain Email: [EMAIL PROTECTED]

[Rails-spinoffs] Re: Element.hide

2006-12-06 Thread Martin Ström
Yes it will work in the same way but be called $w instead (like ruby's %w dito) It was checked into prototype svn a couple of days ago: http://dev.rubyonrails.org/changeset/5679 Martin On 12/6/06, Michael Peters [EMAIL PROTECTED] wrote: Marius Feraru wrote: Currently, my preferred way

[Rails-spinoffs] Re: Element.hide

2006-12-03 Thread Martin Ström
See my erlier reply today on how to make your local code work with multiple arguments. The multiple argument support is removed in the latest prototype version so you should use this style instead: ['element1', 'element2', 'elemen3'].each(Element.hide); On 11/28/06, [EMAIL PROTECTED] [EMAIL