[Javascript] dynamically hide an element
Mark Kelly
javascript at wastedtimes.net
Thu Nov 30 19:07:18 CST 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
More information about the Javascript
mailing list