JRS: In article <6tVPd.532$>, dated Mon, 14
Feb 2005 04:06:26, seen in news:comp.lang.javascript, RobG
<> posted :
>Matthew Lock wrote:
>> Interesting. I would usually abbreviate the first way to this:
>>
>> tmp[i].style.display = tmp[i].style.display == 'block' ? 'none' :
>> 'block';
>>
>> Or if you didn't want to repeat "tmp[i].style.display" twice, this:
>>
>> var t = tmp[i].style.display;
>> t = t == 'block' ? 'none' : 'block';
>>
>
> Have a read of Mike Winter's post:
>
>news://inetbws1.citec.qld.gov.au:119...000cwo.googleg
>roups.com
>
> to discover why toggling between 'block' and 'none' is not
> recommended. It's probably better to go between '' and 'none'.
But that does not just toggle between those two; it converts anything
but 'block' to 'block' and 'block' to 'none'.
==
When you find a relevant article on the Web, it's best to include its
essence, as well as its URL, in News; some of us read news off-line.
Copy'n'paste should be able to extract something suitable from a well-
written item.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.