[Javascript] dynamically hide an element

diego nunes dnunes at gmail.com
Thu Nov 30 22:57:16 CST 2006


> On Thursday 30 November 2006 14:09, diego nunes wrote:
> >     The name of a property should reflect its meaning, not its
> > formatting.

On 11/30/06, Mark Kelly <javascript at wastedtimes.net> wrote:
> I agree wholeheartedly, but in this case, surely the formatting *is* the
> meaning
    Not exactly. Why is the element hidden? Like... Is it because it's
not focused you don't want it to show up? Is it because other action
(on some "parent" element) triggered it, and bla bla bla...?


> 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.
    Mark, if you one day decide that, instead of being completely
hidden, the element should just be translucid or something? If it just
change its position and size? If with a new redesign of the
application (or website, whatever) it would be interesting to have all
the elements showing, only with a minor difference between them?
    Think about why the element is hidden, not that it *is* and that's it.

    The class can be "unfocused", instead, or anything that make clear
why the element is having that formatting, but without describing the
formatting itself. It will keep its meaning valid even with a redesign
of the interface, or a slight change in the behavior.

  Amplexos.

--
diego nunes
dnunes.com



More information about the Javascript mailing list