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: javascript at wastedtimes.net (Mark Kelly)
  • Subject: [Javascript] dynamically hide an element
  • Date: Thu Nov 30 19:07:38 2006

On Thursday 30 November 2006 14:09, diego nunes wrote:

>     The name of a property should reflect its meaning, not its
> formatting.

I agree wholeheartedly, but in this case, surely the formatting *is* the 
meaning - the class has no other purpose, and only a single attribute. I 
pondered for quite a while over this, and would like to hear how you would 
do it. In the programs I'm using it for it is not the only class applied 
to the element (unlike the simple example I posted for clarity), more like

<div id="options" class="requester options hidden">

I would be genuinely interested in hearing about another way, as before I 
asked about this on the list I was setting properties directly, and I'm 
far happier with this method, but open to any ideas that could help me do 
a better job.

Thanks

Mark