Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #16797

Re: showing & hiding Divs

Date 2012-10-22 16:23 +0200
From SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Newsgroups comp.lang.javascript
Subject Re: showing & hiding Divs
References <c9f01909-ee2f-4a40-9393-9876790b4129@googlegroups.com> <50854c8a$0$23450$ba4acef3@reader.news.orange.fr> <18la88lrqrcqf7se0d73jhs4bas017umv1@4ax.com>
Message-ID <508556cf$0$21230$ba4acef3@reader.news.orange.fr> (permalink)
Organization les newsgroups par Orange

Show all headers | View raw


Le 22/10/12 16:16, Hans-Georg Michna a écrit :
> On Mon, 22 Oct 2012 15:39:22 +0200, SAM wrote:
>
>> function toggle(id){
>>    id = document.getElementById(id).style;
>>    id.display = id.display==''? 'block' : '';
>> }
>
> Perhaps it would be better to change 'block' to 'none'.

as they are un-displayed (at display:none) by default
why to tell it back ?


no, but maybe :
	id.display = id.display=='block'? '' : 'block';
five more characters :-(



-- 
Stéphane Moriaux avec/with iMac-intel

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

showing & hiding Divs jayachandran.kandasamy@gmail.com - 2012-10-22 00:19 -0700
  Re: showing & hiding Divs SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-10-22 15:39 +0200
    Re: showing & hiding Divs Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-22 16:16 +0200
      Re: showing & hiding Divs SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-10-22 16:23 +0200
      Re: showing & hiding Divs SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-10-22 16:26 +0200
  Re: showing & hiding Divs Danny <dann90038@gmail.com> - 2012-10-22 14:34 -0700

csiph-web