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
When I want to show an element via $('some-selector').show(), I expect it to set the element's display property to block. It looks like the .show() function wants you to pass in the display type, which is fine. the problem is that if you fail to pass in a display type, the default is an empty string.
It may just be that I'm used to jQuery's behavior, but to me it seems like a more reasonable default, since setting an element's display to "" doesn't seem to show the element. I, for one, think it's confusing that I can call the function show and I get neither an error nor a visible element.
Thoughts?
The text was updated successfully, but these errors were encountered:
this has been brought up before and is a little interesting. we can set things to block, but not all things are block... which would cause a lot of unexpected behavior as well. in either case, pass in type when needed
Yes, I caught up on the issue a bit here. I meant to close this issue with the message that I found out this is actually a part of bonzo. I now see how, in the spirit of keeping the logic uncomplicated, keeping the show function as-is is reasonable.
When I want to show an element via
$('some-selector').show()
, I expect it to set the element'sdisplay
property toblock
. It looks like the.show()
function wants you to pass in the display type, which is fine. the problem is that if you fail to pass in a display type, the default is an empty string.It may just be that I'm used to jQuery's behavior, but to me it seems like a more reasonable default, since setting an element's
display
to""
doesn't seem to show the element. I, for one, think it's confusing that I can call the functionshow
and I get neither an error nor a visible element.Thoughts?
The text was updated successfully, but these errors were encountered: