Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] dynamically hide an element


  • From: mdougherty at pbp.com (Mike Dougherty)
  • Subject: [Javascript] dynamically hide an element
  • Date: Wed Nov 29 21:32:21 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@xxxxxxxxx> 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);
> }