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

Contradiction between show and css documentation about !important behaviour #1014

Closed
eironman opened this issue Dec 21, 2016 · 2 comments
Closed

Comments

@eironman
Copy link
Contributor

In page http://api.jquery.com/show/ there is this note:

Note: If using !important in your styles, such as display: none !important, it is necessary to override the style using .css( "display", "block !important") should you wish for .show() to function correctly.

Whereas in http://api.jquery.com/css/ we have this note:

Note: .css() ignores !important declarations. So, the statement $( "p" ).css( "color", "red !important" ) does not turn the color of all paragraphs in the page to red. It's strongly advised to use classes instead; otherwise use a jQuery plugin.

@AurelioDeRosa
Copy link
Member

Good point. Do you want to submit a PR for this?

@eironman
Copy link
Contributor Author

Ah, ok, I'll do that, thanks

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

No branches or pull requests

2 participants