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


Groups > comp.lang.javascript > #16798

Re: showing & hiding Divs

Date 2012-10-22 16:26 +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 <50855792$0$18053$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'.

no, because the div's display must be at none by default
(if not and without JS enabled ... nothing accessible on the page)



-- 
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