[Javascript] dynamically hide an element

Mike Dougherty mdougherty at pbp.com
Wed Nov 29 21:35:45 CST 2006


I think this point gets even stronger if you added more rules for the class selector - since it 
would take (potentially) several lines of code to set each style without CSS, but only one line to 
modify the class.  Depending on whether you provide complete solutions or work with a team, it's 
usually better to keep the code away from the artists who want to skin the site every few weeks. 
:)

ex:
.highlight {
font-size: 1.25em;
font-weight: bold;
line-height: 1.5em;
text-decoration: underline;
color: yellow;
background-color: black;
etc.
}

On Thu, 30 Nov 2006 01:59:09 +0000
  "Aaron Bassett" <aaronbassett at gmail.com> wrote:
> Then someone has the bright idea that instead of any of the elements being
> hidden they should all have their background changed to bright pink with
> purple dots (or whatever, have their alpha set to 50% etc etc) instead
> 
> .toggled {
> display: none;
> }
> 
> to
> 
> .toggled {
> background: url(pinkdots.gif);
> }




More information about the Javascript mailing list