The Mochikit Style function "showElement" works as follows:
<code>this.showElement = m.partial(this.setDisplayForElement,
'block');</code>

In other words, it sets the display style of the element to "block".
I suspect the reason it does this is because whoever wrote the
function figured "we can't know what display type the element really
should have, and 'block' is the most common, so ... let's just use
that".  However, there is another way.

If this function were instead:
<code>this.showElement = m.partial(this.setDisplayForElement, '');</
code>
(in other words, if it set the element's display style to an empty
string)

it would set the element's display style to nothing, which would
effectively set it back to whatever it was originally ("block" for a
block-level element, "inline" for an inline one, etc.).  This would
enable the use of the hideElement/showElement functions on any
element, not just block-level ones.

So my question to the group is, am I missing a major flaw with this
proposal?  Or is the whole "block" thing just a matter of not knowing
about the empty string option?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to