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


Groups > comp.lang.javascript > #35172

Re: Altering a CSS class with JavaScript?

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Altering a CSS class with JavaScript?
Date 2018-06-03 00:25 +0200
Organization PointedEars Software (PES)
Message-ID <f52b51c0-ef39-907d-0d2e-e8210765465f@PointedEars.de> (permalink)
References <1df34733-dc9a-4edf-a4b8-92dc1de90a16@googlegroups.com> <c4bb0748-cc2e-4634-b263-42b01cb64801@googlegroups.com> <233c3ea9-b903-44ad-8435-2a6236003a38@googlegroups.com> <3197134.joGGxDtPI3@PointedEars.de> <pev6rp.3g0.1@mid.maikkoenig.de>

Show all headers | View raw



Maik Koenig wrote:
> Am 01.06.2018 um 13:25 schrieb Thomas 'PointedEars' Lahn:
>> The most simple, compatible, and arguably most efficient, way to modify a 
>> stylesheet is to append a new “link” or “style” element to the “head” 
>> element.  (However, I am not certain if it works with “link” elements, too.)
> 
>   var link = document.createElement("link");
>   link.href = "test.css"
>   link.type = "text/css";
>   link.rel = "stylesheet";
>   link.media = "screen, print"
>   document.body.appendChild(link);

You are missing the point and have yet to make one.


PointedEars
-- 
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

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


Thread

Altering a CSS class with JavaScript? Dr J R Stockton <J.R.Stockton@physics.org> - 2018-05-31 14:44 -0700
  Re: Altering a CSS class with JavaScript? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-05-31 22:23 -0700
    Re: Altering a CSS class with JavaScript? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-05-31 22:28 -0700
      Re: Altering a CSS class with JavaScript? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-06-01 12:38 +0200
        Re: Altering a CSS class with JavaScript? Dr J R Stockton <J.R.Stockton@physics.org> - 2018-06-03 11:17 -0700
          Re: Altering a CSS class with JavaScript? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-06-05 10:50 -0700
      Re: Altering a CSS class with JavaScript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-06-01 13:25 +0200
        Re: Altering a CSS class with JavaScript? Dr J R Stockton <J.R.Stockton@physics.org> - 2018-06-02 11:06 -0700
          Re: Altering a CSS class with JavaScript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-06-02 20:51 +0200
            Re: Altering a CSS class with JavaScript? snipeco.2@gmail.com (Sn!pe) - 2018-06-02 21:19 +0100
        Re: Altering a CSS class with JavaScript? Maik Koenig <usenetspam@maikkoenig.de> - 2018-06-02 22:48 +0200
          Re: Altering a CSS class with JavaScript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-06-03 00:25 +0200

csiph-web