Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #22892
| Message-ID | <1625563.xoXGFsQP0u@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2014-01-30 20:17 +0100 |
| Subject | Re: How to change style from id to class? |
| Newsgroups | comp.lang.javascript |
| References | <3105082e-9d14-4e82-a104-c1b34a9b571e@googlegroups.com> <iauke9pmho07mgqs1kdo11e63q5lbs5jnn@hive.bjoern.hoehrmann.de> <e95d8eab-bb7c-41fe-85c6-305ada95babb@googlegroups.com> |
WanWan wrote:
^^^^^^
Please use your real name and avoid the borken Google Groups.
> I've already changed using javascript:
>
> <div id='example'>...</div>
> to
> <div id='uniqueId1' class='example'>...</div>
>
>
> Now the style no longer apply.
> A possible solution is to change using javascript:
There is no javascript. You would be using an ECMAScript implementation to
access the DOM implementation; the former could be Mozilla JavaScript if it
was in a Mozilla-based browser.
<http://PointedEars.de/es-matrix>
> div#example { color: blue; ... }
> to
> div.example { color: blue; ... }
Not possible. The “selectorText” property is read-only in at least one
major DOM implementation, the Gecko DOM.
> OR apply div#example to <div id='uniqueId1' class='example'> some other
> way.
You can create and append a new rule having the same CSS property
specifications but a different selector.
> [top post]
<http://PointedEars.de/faq#posting>
--
PointedEars
Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to change style from id to class? WanWan <jippijappo@hotmail.com> - 2014-01-30 07:43 -0800
Re: How to change style from id to class? Bjoern Hoehrmann <bjoern@hoehrmann.de> - 2014-01-30 17:12 +0100
Re: How to change style from id to class? WanWan <jippijappo@hotmail.com> - 2014-01-30 08:24 -0800
Re: How to change style from id to class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-30 20:17 +0100
Re: How to change style from id to class? WanWan <jippijappo@hotmail.com> - 2014-01-30 12:33 -0800
Re: How to change style from id to class? Bart Van der Donck <bart@nijlen.com> - 2014-01-31 00:45 -0800
Re: How to change style from id to class? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-31 11:59 +0100
Re: How to change style from id to class? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-31 13:55 +0100
csiph-web