Closed rvagg closed 12 years ago
with more intelligence comes a loss of speed. also, there's no true way of figuring this out — given the one case where an element could be display:none
by default.
nevertheless, this does bring up an issue that i need to fix, whereby toggle really should be using the internal show
, passing along an override.
should have referenced the commit, but i addressed this in the lastest push
I guess that'll do for now but I'd still like to tackle some intelligence at some point to see how it goes. The default to ''
in toggle()
is certainly a step forward!
show()
usesdisplay=''
with possible overridetype
toggle()
usesdisplay='block'
with no possible overridethey should determine most appropriate display value for the particular element either from existing style information or perhaps by creating virgin elements and testing them and caching the values for each element type.
hide()
should probably save the old display value so that can be restored byshow()
.