You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if a div has a class .hide which sets display:none then bonzo's show() will simply set el.style.display = ""
this will not override the class's value.
instead i have to call show('block') to get it to work. jquery has an overly complicated method allowing it to properly set the default display to elements (since sometimes showing means making the display inline, inline-block, table-row, etc etc....)
css3 has an initial value that works on all attributes (https://developer.mozilla.org/en/CSS/initial) which would be perfect in this scenario, but the browser support is limited right now.
you could take the 80% approach and set the display to block and get most of the way there.
i'm just manually setting mine as it isn't a big deal, but it is a quick 'gotcha' for those new to bonzo coming from jquery
The text was updated successfully, but these errors were encountered:
if a div has a class
.hide
which setsdisplay:none
then bonzo'sshow()
will simply setel.style.display = ""
this will not override the class's value.
instead i have to call
show('block')
to get it to work. jquery has an overly complicated method allowing it to properly set the default display to elements (since sometimes showing means making the display inline, inline-block, table-row, etc etc....)css3 has an
initial
value that works on all attributes (https://developer.mozilla.org/en/CSS/initial) which would be perfect in this scenario, but the browser support is limited right now.you could take the 80% approach and set the display to
block
and get most of the way there.i'm just manually setting mine as it isn't a big deal, but it is a quick 'gotcha' for those new to bonzo coming from jquery
The text was updated successfully, but these errors were encountered: