Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.show() works a bit funny #62

Closed
benekastah opened this issue Dec 11, 2011 · 3 comments
Closed

.show() works a bit funny #62

benekastah opened this issue Dec 11, 2011 · 3 comments

Comments

@benekastah
Copy link

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?

@ded
Copy link
Owner

ded commented Dec 12, 2011

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

@benekastah
Copy link
Author

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.

@ded
Copy link
Owner

ded commented Dec 15, 2011

awesome. thanks for understanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants