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


Groups > comp.lang.javascript > #31147

Re: problem with disabling div

Newsgroups comp.lang.javascript
Subject Re: problem with disabling div
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <ea5c8a11-d715-4649-a0e8-f69f9775d0b2@googlegroups.com> <np92e2$ska$1@dont-email.me> <npji1n$c49$1@gioia.aioe.org>
Date 2016-08-24 10:30 +0200
Message-ID <XnsA66E6AE52D05Deejj99@194.109.6.166> (permalink)

Show all headers | View raw


Jivanmukta <jivanmukta@poczta.onet.pl> wrote on 24 Aug 2016 in
comp.lang.javascript: 

> I added to my view "show/hide attachments" button. I want to have 
> attachments invisible by default. When user presses "show attachments"
> the attachments (images and movies) should be shown. When user presses
> "hide attachments" the attachments should be hidden. The attachments
> should never be printed.

Do this with css, no javascript needed:

@media print {
	.noprint {display:none;}
}

input#hide[type=checkbox]:checked + .noshowchecked {
  display:none;
} 

<div class='noprint noshowchecked'>...</div>
<div class='noprint noshowchecked'>...</div>
<div class='noprint'>...</div>
<input type='checkbox' id='hide'> Hide

Debug for the exact syntax, perhaps follow up in:
comp.infosystems.www.authoring.stylesheets

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

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


Thread

problem with disabling div jivanmukta@poczta.onet.pl - 2016-08-20 00:32 -0700
  Re: problem with disabling div Osmo Saarikumpu <osmo@weppipakki.com> - 2016-08-20 10:55 +0300
    Re: problem with disabling div jivanmukta@poczta.onet.pl - 2016-08-20 02:08 -0700
    Re: problem with disabling div Jivanmukta <jivanmukta@poczta.onet.pl> - 2016-08-24 09:23 +0200
      Re: problem with disabling div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-24 10:30 +0200
        Re: problem with disabling div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-24 10:48 +0200
          Re: problem with disabling div Jivanmukta <jivanmukta@poczta.onet.pl> - 2016-08-24 12:32 +0200
            Re: problem with disabling div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-24 19:27 +0200
        Re: problem with disabling div Jivanmukta <jivanmukta@poczta.onet.pl> - 2016-08-24 11:17 +0200
          Re: problem with disabling div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-24 11:50 +0200
          Re: problem with disabling div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-24 19:24 +0200
            Re: problem with disabling div John Harris <niam@jghnorth.org.uk.invalid> - 2016-08-24 20:08 +0100
              Re: problem with disabling div Andrew Poulos <ap_prog@hotmail.com> - 2016-08-25 06:47 +1000
                Re: problem with disabling div John Harris <niam@jghnorth.org.uk.invalid> - 2016-08-25 09:47 +0100
                Re: problem with disabling div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-25 18:37 +0200
                Re: problem with disabling div John Harris <niam@jghnorth.org.uk.invalid> - 2016-08-26 10:46 +0100
                Re: problem with disabling div Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-08-25 22:46 +0100
                Re: problem with disabling div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-26 12:41 +0200
                Re: problem with disabling div Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-08-27 21:02 +0100
                Re: problem with disabling div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-28 12:07 +0200
                Re: problem with disabling div Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-08-29 21:39 +0100
                Re: problem with disabling div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-30 10:45 +0200
                Re: problem with disabling div $Bill <news@todbe.com> - 2016-08-28 03:25 -0700

csiph-web